Merge remote-tracking branch 'origin/develop'
git@83a9185fedd502b8be94b92a2e107b44527b53e1
https://github.com/srz-zumix/iutest/commit/83a9185fedd502b8be94b92a2e107b44527b53e1
Merge remote-tracking branch 'origin/develop'
git@b4a7ec3e7e50e34b88c8953de5dc7f91fe71b465
add github.com
git@50498a76aafc9caa0e90de7b6d56d3787a1941c0
Merge remote-tracking branch 'origin/develop'
git@44b1690d7810001b9af203f353876204df8cd97f
update doc [ci skip]
git@2ba7c69c0aa6f134ae537f17cb1f94c09096f789
Merge remote-tracking branch 'origin/develop'
git@3ccf58d478d82403218d639add12f274ffb10dd1
Merge pull request #431 from srz-zumix/feature/update_osdn_release_dockerfile
fix lang [ci skip]
git@4ded063e7353c5874c253a7c465020e08833ef66
Merge pull request #430 from srz-zumix/feature/wandbox_response_none
iuwandbox json decode error
git@a28b3fbe2ac1a1f4b0e7e6adf10b5d48b949c30e
Merge pull request #429 from srz-zumix/feature/osdn_hostkeychecking_no
add ssh config
git@a192985ce262cc759d751c518b415bcc514c5808
fix lang [ci skip]
git@b1e3413af6e20cbce3f55d45d24d6e6ddccda6fc
iuwandbox json decode error
git@b1a44e10b346830998ef5876a5ea048e869fb476
tag to latest (#428)
* tag to latest
* copy to root on master
git@420e845cf82db376194c3a63701e5661efb14365
update README [ci skip]
git@3be4d0b93c4e3f8d668ddf14638010cfed147281
add ssh config
git@e8d5f4f5229748cd14ef688a82dc85ffbf64a32e
Merge remote-tracking branch 'origin/develop'
git@eb8017c1ed4eda29eee956937e533ae632d1bdb5
v1.17.0.7
git@d1a6e1201d17b7e081fa9787d8fc8c4ba563ede0
support local run (#426)
* support local run
* update
git@9782bae0c7089e9adc274cd14083a1b49c020572
Codeship/sync svn (#425)
* add sync-svn step
* +x
* fix lint
* fix lint
git@ea1b597c8ebf13d79f29eb9f2b4ad905d1667c44
GitHub Pages の更新を GitHub Actions に移行 (#424)
git@e797c2cbc3b30c826bd63f8df5b53be19ba2aa1b
Merge remote-tracking branch 'origin/develop'
git@66b72a2f2766e7b3ad1d9f692448cceb26e06663
add .scrutinizer.yml (#422)
* add .scrutinizer.yml
* command
git@def81bddd88283e98f7511866f5c8763124ee7c9
add clang 10.0.0 (#420)
git@efec46728536148c80d06c5e3b9a230e3d6d75ab
update docker (#421)
* update docker
* up
* up
* update python env
git@df2067e05e3e1ae650604f01211c74b74cba8ba3
push docker hub (#419)
* no build docker image
* rm quality
* create docker hub
* fix image name
git@38fe7dc01fd859ac4c68212f7c76c87afe28081e
python3 (#418)
* python3
* fix box
* update
* update
git@ff68cd72775d5d9838fa80bc6baa1d8ccd31f3f3
Merge remote-tracking branch 'origin/develop'
git@4715ecbe8d6998a121a47c3bdbd15cfd9fe1cdb8
version 1.17.0.6
git@bbb553376a20fe8d83b0a45f94d39b8f9bfab1d9
Merge remote-tracking branch 'origin/develop'
git@cf8455268e6ab2aa5a3286b0aff51e068186e0fd
short name for non variadic templates (#414)
* short name for non variadic templates
* update
* fix cpplint
* update clang-10
* revert
git@6e91acfc5bf5d07b82e4b4f5a2f7ab0d5c2e49d3
codeship pro (#417)
git@193dd4eb8cdc8434a879c3bd7bbc9c7998fc2905
Merge pull request #416 from srz-zumix/faeture/update_wandbox
fix wandbox-api update
git@bfda704435a38babe6fd2fa06be949aaab6aef77
fix
git@c45c0f7ab18b5eaa1cca1f74f8e9f9d683d8f859
fix wandbox-api update
git@755aa699135ac0849a6f9fc5105b79d31de11c92
Merge pull request #415 from srz-zumix/circleci/update
eoan
git@92d2cdfe608f8329df69379fdd6c9f406f8c3049
eoan
git@bb4fc2cade81e3411525fdd974c097ff6d221123
Merge pull request #413 from srz-zumix/semaphore/path_filter
path filter
git@6db77a75b89a1a25aa3400d2315f772513622bad
path filter
git@f77444543943f2f3f26cd7003bd676790556e40c
Drone/parallel (#412)
git@d204f875d5fb0b6d7d2eae48b1baacc2818c9659
Add GetTypeName test (#404)
git@305dd7419a113862b256659cfdd32f8f8f1888cf
greetings
git@640eff2b7cce42e93ea8a64d2011eac11a25b60b
update install script (#411)
git@527e4f38fad899af3f519227732a3118407fced1
Merge pull request #410 from srz-zumix/shippable/update_yml
update shippable
git@50b0372bb2adbec35228712e02a720bd9cce61fb
update shippable
git@a6ea09926c6dd2a706c5f9574253d9069e5e2e15
@@ -1,7 +1,7 @@ | ||
1 | 1 | # |
2 | 2 | # |
3 | 3 | # |
4 | -# Copyright (C) 2018, Takazumi Shirayanagi | |
4 | +# Copyright (C) 2018-2020, Takazumi Shirayanagi | |
5 | 5 | # This software is released under the new BSD License, |
6 | 6 | # see LICENSE |
7 | 7 |
@@ -23,9 +23,9 @@ | ||
23 | 23 | [![Coverity Scan Build Status](https://scan.coverity.com/projects/1316/badge.svg)](https://scan.coverity.com/projects/srz-zumix-iutest) |
24 | 24 | [![GuardRails badge](https://badges.guardrails.io/srz-zumix/iutest.svg?token=fe1bb5ca5f743800d26e4d2b7282c5b316df83c0b228048f4192510bdd7280f0)](https://dashboard.guardrails.io/default/gh/srz-zumix/iutest) |
25 | 25 | [![GitHub Actions reviewdog Status](https://github.com/srz-zumix/iutest/workflows/GitHub%20Actions%20-%20reviewdog/badge.svg?branch=develop)](https://github.com/srz-zumix/iutest/actions?query=workflow%3A%22GitHub+Actions+-+reviewdog%22) |
26 | -[![New(3-clause) BSD License](https://img.shields.io/badge/license-New_BSD-blue.svg)](http://opensource.org/licenses/BSD-3-Clause) | |
26 | +[![New(3-clause) BSD License](https://img.shields.io/badge/license-New_BSD-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) | |
27 | 27 | [![NuGet version](https://badge.fury.io/nu/iutest.svg)](https://badge.fury.io/nu/iutest) |
28 | -[![support](https://img.shields.io/badge/%24-support-orange.svg)](http://amzn.asia/6fNxDZU) | |
28 | +[![support](https://img.shields.io/badge/%24-support-orange.svg)](https://amzn.asia/6fNxDZU) | |
29 | 29 | |
30 | 30 | iutest |
31 | 31 | ========== |
@@ -81,13 +81,13 @@ | ||
81 | 81 | * in repository |
82 | 82 | doc/index.html |
83 | 83 | * online document |
84 | - [least released version(OSDN)](http://iutest.osdn.jp/doc/index.html) | |
85 | - [GitHub master branch (gh-pages)](http://srz-zumix.github.io/iutest/) | |
84 | + [latest released version](https://srz-zumix.github.io/iutest/latest) | |
85 | + [GitHub master branch](https://srz-zumix.github.io/iutest/master) | |
86 | 86 | |
87 | 87 | Project page |
88 | 88 | -------------------------------------------------- |
89 | 89 | |
90 | -* [OSDN Project page](http://iutest.osdn.jp/) | |
90 | +* [OSDN Project page](https://iutest.osdn.jp/) | |
91 | 91 | * [GitHub](https://github.com/srz-zumix/iutest) |
92 | 92 | |
93 | 93 | Support |
@@ -120,19 +120,20 @@ | ||
120 | 120 | |[Cirrus CI](https://cirrus-ci.org/)|[![Cirrus Build Status](https://api.cirrus-ci.com/github/srz-zumix/iutest.svg?branch=master)](https://cirrus-ci.com/github/srz-zumix/iutest/master)|[![Cirrus Build Status](https://api.cirrus-ci.com/github/srz-zumix/iutest.svg?branch=develop)](https://cirrus-ci.com/github/srz-zumix/iutest/develop)|g++/clang std=c++14,17.. Basic tests, FreeBSD Basic tests| |
121 | 121 | |[Codacy](https://www.codacy.com/)|[![Codacy Badge](https://api.codacy.com/project/badge/Grade/e6407b63c9c844d080ed71c7707bded9?branch=master)](https://www.codacy.com/app/srz-zumix/iutest?utm_source=github.com&utm_medium=referral&utm_content=srz-zumix/iutest&utm_campaign=Badge_Grade)|[![Codacy Badge](https://api.codacy.com/project/badge/Grade/e6407b63c9c844d080ed71c7707bded9?branch=develop)](https://www.codacy.com/app/srz-zumix/iutest?utm_source=github.com&utm_medium=referral&utm_content=srz-zumix/iutest&utm_campaign=Badge_Grade)|Shellcheck, Cppcheck, PyLint, etc...| |
122 | 122 | |[Codefresh](https://codefresh.io/)|[![Codefresh build status](https://g.codefresh.io/api/badges/pipeline/srz-zumix/iutest%2Fiutest_unittest?branch=master&type=cf-1)](https://g.codefresh.io/pipelines/iutest_unittest/builds?repoOwner=srz-zumix&repoName=iutest&serviceName=srz-zumix%2Fiutest&filter=trigger:build~Build;branch:master;pipeline:58a933be9d1bd40100495882~iutest_unittest)|[![Codefresh build status](https://g.codefresh.io/api/badges/pipeline/srz-zumix/iutest%2Fiutest_unittest?branch=develop&type=cf-1)](https://g.codefresh.io/pipelines/iutest_unittest/builds?repoOwner=srz-zumix&repoName=iutest&serviceName=srz-zumix%2Fiutest&filter=trigger:build~Build;branch:develop;pipeline:58a933be9d1bd40100495882~iutest_unittest)|Build tools/docker/Dockerfile, Benchmark test, Gcc 8/9 basic test| |
123 | -|[Codeship](https://codeship.com/)|[![Codeship Status for srz-zumix/iutest](https://app.codeship.com/projects/5bc87030-5b41-0133-6000-4242aa07dce3/status?branch=master)](https://app.codeship.com/projects/110695)|[![Codeship Status for srz-zumix/iutest](https://app.codeship.com/projects/5bc87030-5b41-0133-6000-4242aa07dce3/status?branch=develop)](https://app.codeship.com/projects/110695)|Update documents, Check coding standard of the project| | |
123 | +|[Codeship](https://codeship.com/)|[![Codeship Status for srz-zumix/iutest](https://app.codeship.com/projects/5bc87030-5b41-0133-6000-4242aa07dce3/status?branch=master)](https://app.codeship.com/projects/110695)|[![Codeship Status for srz-zumix/iutest](https://app.codeship.com/projects/5bc87030-5b41-0133-6000-4242aa07dce3/status?branch=develop)](https://app.codeship.com/projects/110695)|Check coding standard of the project| | |
124 | 124 | |[Coverity Scan](https://scan.coverity.com)|[![Coverity Scan Build Status](https://scan.coverity.com/projects/1316/badge.svg)](https://scan.coverity.com/projects/srz-zumix-iutest)||Coverity Scan| |
125 | 125 | |[Drone Cloud](https://cloud.drone.io)|[![Drone Build Status](https://cloud.drone.io/api/badges/srz-zumix/iutest/status.svg?branch=master)](https://cloud.drone.io/srz-zumix/iutest)|[![Build Status](https://cloud.drone.io/api/badges/srz-zumix/iutest/status.svg?branch=develop)](https://cloud.drone.io/srz-zumix/iutest)|gtest compatible test for released versions / gtest version detect test| |
126 | 126 | |[GitHub Actions](https://github.com/srz-zumix/iutest/actions?query=workflow%3A"GitHub+Actions")|[![GitHub Actions Status](https://github.com/srz-zumix/iutest/workflows/GitHub%20Actions/badge.svg?branch=master)](https://github.com/srz-zumix/iutest/actions?query=workflow%3A%22GitHub+Actions%22+branch%3Amaster)|[![GitHub Actions Status](https://github.com/srz-zumix/iutest/workflows/GitHub%20Actions/badge.svg?branch=develop)](https://github.com/srz-zumix/iutest/actions?query=workflow%3A%22GitHub+Actions%22+branch%3Adevelop)|Basic test (Windows LLVM clang and mingw), EditorConfig Lint, Include What You Use, arm-none-eabi-gcc build| |
127 | 127 | |[GitHub Actions reviewdog](https://github.com/srz-zumix/iutest/actions?query=workflow%3A"GitHub+Actions+reviewdog")|[![GitHub Actions Reviewdog Status](https://github.com/srz-zumix/iutest/workflows/GitHub%20Actions%20-%20reviewdog/badge.svg?branch=develop)](https://github.com/srz-zumix/iutest/actions?query=workflow%3A%22GitHub+Actions+-+reviewdog%22+branch%3Amaster)||Reviewdog (shellcheck, cpplint)| |
128 | +|[GitHub Actions Update GitHubPages](https://github.com/srz-zumix/iutest/actions?query=workflow%3A"GitHubPages")|[![Update GitHubPages Status](https://github.com/srz-zumix/iutest/workflows/GitHubPages/badge.svg?branch=develop)](https://github.com/srz-zumix/iutest/actions?query=workflow%3A%22GitHubPages%22+branch%3Amaster)||Update documents| | |
128 | 129 | |[GitLab CI](https://about.gitlab.com/product/continuous-integration/)|[![GitLab CI pipeline status](https://gitlab.com/srz-zumix/iutest-test/badges/master/pipeline.svg)](https://gitlab.com/srz-zumix/iutest-test/commits/master)|[![GitLab CI pipeline status](https://gitlab.com/srz-zumix/iutest-test/badges/develop/pipeline.svg)](https://gitlab.com/srz-zumix/iutest-test/commits/develop)|Google Test/Google Mock compatibility (HEAD)| |
129 | 130 | |[Peakflow](https://www.peakflow.io)|[![Peakflow Build Status](https://www.peakflow.io/en/projects/iutest/branch-statuses/master.svg)](https://www.peakflow.io/en/projects/iutest/build-groups?build_groups_q%5Bbranch_name_cont%5D=master)|[![Peakflow Build Status](https://www.peakflow.io/en/projects/iutest/branch-statuses/develop.svg)](https://www.peakflow.io/en/projects/iutest/build-groups?build_groups_q%5Bbranch_name_cont%5D=develop)|| |
130 | 131 | |[Scrutinizer](https://scrutinizer-ci.com/)|[![Scrutinizer Build Status](https://scrutinizer-ci.com/g/srz-zumix/iutest/badges/build.png?b=master)](https://scrutinizer-ci.com/g/srz-zumix/iutest/build-status/master)|[![Scrutinizer Build Status](https://scrutinizer-ci.com/g/srz-zumix/iutest/badges/build.png?b=develop)](https://scrutinizer-ci.com/g/srz-zumix/iutest/build-status/develop)|iuwandbox tests| |
131 | 132 | |[Semaphore](https://semaphoreci.com/)|[![Semaphore Build Status](https://semaphoreci.com/api/v1/srz_zumix/iutest/branches/master/badge.svg)](https://semaphoreci.com/srz_zumix/iutest)|[![Semaphore Build Status](https://semaphoreci.com/api/v1/srz_zumix/iutest/branches/develop/badge.svg)](https://semaphoreci.com/srz_zumix/iutest)|Scan-build| |
132 | 133 | |[Semaphore 2.0](https://semaphoreci.com/)|[![Semaphore 2.0 Build Status](https://srz-zumix.semaphoreci.com/badges/iutest/branches/master.svg)](https://srz-zumix.semaphoreci.com/projects/iutest)|[![Semaphore 2.0 Build Status](https://srz-zumix.semaphoreci.com/badges/iutest/branches/develop.svg)](https://srz-zumix.semaphoreci.com/projects/iutest)|Scan-build, Basic test, sample run| |
133 | -|[Shippable](http://shippable.com/)|[![Shippable Run Status](https://api.shippable.com/projects/541904d2ac22859af743f867/badge?branch=master)](https://app.shippable.com/github/srz-zumix/iutest)|[![Run Status](https://api.shippable.com/projects/541904d2ac22859af743f867/badge?branch=develop)](https://app.shippable.com/github/srz-zumix/iutest)|Syntax tests for compiler each version (c++98)| | |
134 | +|[Shippable](https://shippable.com/)|[![Shippable Run Status](https://api.shippable.com/projects/541904d2ac22859af743f867/badge?branch=master)](https://app.shippable.com/github/srz-zumix/iutest)|[![Run Status](https://api.shippable.com/projects/541904d2ac22859af743f867/badge?branch=develop)](https://app.shippable.com/github/srz-zumix/iutest)|Syntax tests for compiler each version (c++98)| | |
134 | 135 | |[Travis CI](https://travis-ci.com/)|[![Travis-CI Build Status](https://travis-ci.com/srz-zumix/iutest.svg?branch=master)](https://travis-ci.com/srz-zumix/iutest)|[![Travis-CI Build Status](https://travis-ci.com/srz-zumix/iutest.svg?branch=develop)](https://travis-ci.com/srz-zumix/iutest)|Basic tests, Google Test compatibility, Coverage, Coverity-scan| |
135 | -|[Wercker](http://www.wercker.com/)|[![wercker status](https://app.wercker.com/status/d385156052aa4118a7f24affe4a8f851/s/master "wercker status")](https://app.wercker.com/project/byKey/d385156052aa4118a7f24affe4a8f851)|[![wercker status](https://app.wercker.com/status/d385156052aa4118a7f24affe4a8f851/s/develop "wercker status")](https://app.wercker.com/project/byKey/d385156052aa4118a7f24affe4a8f851)|Syntax tests for compiler each version (c++latest)| | |
136 | +|[Wercker](https://www.wercker.com/)|[![wercker status](https://app.wercker.com/status/d385156052aa4118a7f24affe4a8f851/s/master "wercker status")](https://app.wercker.com/project/byKey/d385156052aa4118a7f24affe4a8f851)|[![wercker status](https://app.wercker.com/status/d385156052aa4118a7f24affe4a8f851/s/develop "wercker status")](https://app.wercker.com/project/byKey/d385156052aa4118a7f24affe4a8f851)|Syntax tests for compiler each version (c++latest)| | |
136 | 137 | |
137 | 138 | Basic test |
138 | 139 |
@@ -100,8 +100,11 @@ | ||
100 | 100 | - buddy.yml |
101 | 101 | - .circleci/* |
102 | 102 | - .cirrus.yml |
103 | + - .scrutinizer.yml | |
103 | 104 | - codecov.yml |
104 | 105 | - codefresh.yml |
106 | + - codeship-services.yml | |
107 | + - codeship-steps.yml | |
105 | 108 | - .drone.yml |
106 | 109 | - .github/* |
107 | 110 | - .semaphore/* |
@@ -6,6 +6,8 @@ | ||
6 | 6 | - develop |
7 | 7 | - azure-pipelines/* |
8 | 8 | - azurepipelines/* |
9 | + - feature/* | |
10 | + - fix/* | |
9 | 11 | paths: |
10 | 12 | exclude: |
11 | 13 | - "*.md" |
@@ -21,8 +23,11 @@ | ||
21 | 23 | - buddy.yml |
22 | 24 | - .circleci/* |
23 | 25 | - .cirrus.yml |
26 | + - .scrutinizer.yml | |
24 | 27 | - codecov.yml |
25 | 28 | - codefresh.yml |
29 | + - codeship-services.yml | |
30 | + - codeship-steps.yml | |
26 | 31 | - .drone.yml |
27 | 32 | - .github/* |
28 | 33 | - .semaphore/* |
@@ -36,8 +41,6 @@ | ||
36 | 41 | include: |
37 | 42 | - master |
38 | 43 | - develop |
39 | - - feature/* | |
40 | - - fix/* | |
41 | 44 | |
42 | 45 | stages: |
43 | 46 | - stage: Precheck |
@@ -24,7 +24,7 @@ | ||
24 | 24 | title: Building Docker Image |
25 | 25 | stage: build |
26 | 26 | type: build |
27 | - image_name: srz-zumix/iutest | |
27 | + image_name: srzzumix/iutest_dev_env | |
28 | 28 | working_directory: ./ |
29 | 29 | tag: '${{CF_BRANCH_TAG_NORMALIZED}}' |
30 | 30 | dockerfile: ./tools/docker/Dockerfile |
@@ -0,0 +1,8 @@ | ||
1 | +iutest: | |
2 | + build: | |
3 | + image: codeship/iutest | |
4 | + dockerfile: ./tools/docker/Dockerfile | |
5 | + volumes: | |
6 | + - ./.ssh:/root/.ssh | |
7 | + - ./:/work | |
8 | + cached: true |
@@ -0,0 +1,44 @@ | ||
1 | +# iutest using codeship basic | |
2 | +# this file is codeship settings sample | |
3 | +- type: parallel | |
4 | + exclude: gh-pages | |
5 | + steps: | |
6 | + - name: cpplint | |
7 | + service: iutest | |
8 | + command: make -C /work/test/cpplint | |
9 | + - name: check-include-guard | |
10 | + service: iutest | |
11 | + command: make -C /work/test check_incg | |
12 | + - name: check-documents | |
13 | + service: iutest | |
14 | + command: make -C /work/test/docs version-test doxygen-test | |
15 | + - name: editorconfig-self-lint | |
16 | + service: iutest | |
17 | + command: make -C /work editorconfig-self-lint | |
18 | + - name: check-fullpath | |
19 | + service: iutest | |
20 | + command: make -C /work/test/repository check-fullpath | |
21 | + - name: check-crlf | |
22 | + service: iutest | |
23 | + command: /work/.ci/check-crlf.sh | |
24 | + | |
25 | +- type: parallel | |
26 | + exclude: gh-pages | |
27 | + steps: | |
28 | + - name: check-remote-crlf | |
29 | + service: iutest | |
30 | + command: make -C /work/test/repository check-remote-crlf | |
31 | + | |
32 | +- type: parallel | |
33 | + tag: master | |
34 | + steps: | |
35 | + - name: sync-svn | |
36 | + service: iutest | |
37 | + command: /work/.ci/sync-svn.sh | |
38 | + | |
39 | +- type: parallel | |
40 | + tag: v.* | |
41 | + steps: | |
42 | + - name: sync-svn | |
43 | + service: iutest | |
44 | + command: /work/.ci/sync-svn-tag.sh |
@@ -2,6 +2,7 @@ | ||
2 | 2 | |
3 | 3 | LANG=ja_JP.SJIS |
4 | 4 | HTMLLINT_PATH=$(subst \,/, $(HTMLLINT_ROOT)) |
5 | +GHPAGES_DIR:=gh-pages | |
5 | 6 | |
6 | 7 | default: target |
7 | 8 |
@@ -19,15 +20,18 @@ | ||
19 | 20 | # cp '$(DOXYGEN_ROOT)/bin/doxysearch.cgi' html/ |
20 | 21 | |
21 | 22 | gh-pages: target |
22 | - - mkdir gh-pages | |
23 | - cp *.html gh-pages/ | |
24 | - cp -r css gh-pages/ | |
25 | - cp -r html gh-pages/ | |
26 | - cp -r images gh-pages/ | |
27 | - cp ../README.md gh-pages/ | |
28 | - cp -r dev/.circleci gh-pages/ | |
29 | - cp dev/*.yml gh-pages/ | |
23 | + - mkdir ${GHPAGES_DIR} | |
24 | + cp *.html ${GHPAGES_DIR}/ | |
25 | + cp -r css ${GHPAGES_DIR}/ | |
26 | + cp -r html ${GHPAGES_DIR}/ | |
27 | + cp -r images ${GHPAGES_DIR}/ | |
28 | + cp ../README.md ${GHPAGES_DIR}/ | |
30 | 29 | |
30 | +gh-pages-for-master: | |
31 | + cp -r dev/.circleci ${GHPAGES_DIR}/ | |
32 | + cp dev/*.yml ${GHPAGES_DIR}/ | |
33 | + cp ../README.md ${GHPAGES_DIR}/ | |
34 | + | |
31 | 35 | clean: |
32 | 36 | rm -rf html |
33 | 37 | rm -rf gh-pages |
@@ -1,7 +1,7 @@ | ||
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | 2 | |
3 | -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
4 | -<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"> | |
3 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
4 | +<html xmlns="https://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"> | |
5 | 5 | <head> |
6 | 6 | <title>iutest</title> |
7 | 7 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
@@ -8,12 +8,12 @@ | ||
8 | 8 | <meta http-equiv="content-style-type" content="text/css" /> |
9 | 9 | <meta http-equiv="content-script-type" content="text/javascript" /> |
10 | 10 | |
11 | - <link href="http://alexgorbatchev.com/pub/sh/current/styles/shCore.css" rel="stylesheet" type="text/css" /> | |
12 | - <link href="http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css" rel="stylesheet" type="text/css" /> | |
11 | + <link href="https://alexgorbatchev.com/pub/sh/current/styles/shCore.css" rel="stylesheet" type="text/css" /> | |
12 | + <link href="https://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css" rel="stylesheet" type="text/css" /> | |
13 | 13 | <link href="css/doc.css" rel="stylesheet" type="text/css" /> |
14 | 14 | |
15 | - <script src="http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js" type="text/javascript"></script> | |
16 | - <script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCpp.js" type="text/javascript"></script> | |
15 | + <script src="https://alexgorbatchev.com/pub/sh/current/scripts/shCore.js" type="text/javascript"></script> | |
16 | + <script src="https://alexgorbatchev.com/pub/sh/current/scripts/shBrushCpp.js" type="text/javascript"></script> | |
17 | 17 | <script type="text/javascript"> |
18 | 18 | SyntaxHighlighter.all(); |
19 | 19 | </script> |
@@ -91,7 +91,7 @@ | ||
91 | 91 | <div class="contents"> |
92 | 92 | <h1>LICENSE</h1> |
93 | 93 | <div class="text_block"> |
94 | -This software is released under the <a href="http://opensource.org/licenses/BSD-3-Clause">New(3-clause) BSD License</a>.<br /> | |
94 | +This software is released under the <a href="https://opensource.org/licenses/BSD-3-Clause">New(3-clause) BSD License</a>.<br /> | |
95 | 95 | |
96 | 96 | <pre> |
97 | 97 | BSD 3-Clause License |
@@ -1,9 +0,0 @@ | ||
1 | -# for gh-pages | |
2 | -inspecode: | |
3 | - tidy: | |
4 | - #auto-fix: true | |
5 | - ignore: | |
6 | - - html/* | |
7 | - options: | |
8 | - --indent: y | |
9 | - -wrap: 0 |
@@ -0,0 +1,2 @@ | ||
1 | +script: | |
2 | + - echo ok |
@@ -1,7 +1,7 @@ | ||
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | 2 | |
3 | -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
4 | -<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"> | |
3 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
4 | +<html xmlns="https://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"> | |
5 | 5 | <head> |
6 | 6 | <title>iutest</title> |
7 | 7 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
@@ -1,7 +1,7 @@ | ||
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | 2 | |
3 | -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
4 | -<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"> | |
3 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
4 | +<html xmlns="https://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"> | |
5 | 5 | <head> |
6 | 6 | <title>iutest - 入門</title> |
7 | 7 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
@@ -8,12 +8,12 @@ | ||
8 | 8 | <meta http-equiv="content-style-type" content="text/css" /> |
9 | 9 | <meta http-equiv="content-script-type" content="text/javascript" /> |
10 | 10 | |
11 | - <link href="http://alexgorbatchev.com/pub/sh/current/styles/shCore.css" rel="stylesheet" type="text/css" /> | |
12 | - <link href="http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css" rel="stylesheet" type="text/css" /> | |
11 | + <link href="https://alexgorbatchev.com/pub/sh/current/styles/shCore.css" rel="stylesheet" type="text/css" /> | |
12 | + <link href="https://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css" rel="stylesheet" type="text/css" /> | |
13 | 13 | <link href="css/doc.css" rel="stylesheet" type="text/css" /> |
14 | 14 | |
15 | - <script src="http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js" type="text/javascript"></script> | |
16 | - <script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCpp.js" type="text/javascript"></script> | |
15 | + <script src="https://alexgorbatchev.com/pub/sh/current/scripts/shCore.js" type="text/javascript"></script> | |
16 | + <script src="https://alexgorbatchev.com/pub/sh/current/scripts/shBrushCpp.js" type="text/javascript"></script> | |
17 | 17 | <script type="text/javascript"> |
18 | 18 | SyntaxHighlighter.all(); |
19 | 19 | </script> |
@@ -1,7 +1,7 @@ | ||
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | 2 | |
3 | -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
4 | -<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"> | |
3 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
4 | +<html xmlns="https://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"> | |
5 | 5 | <head> |
6 | 6 | <title>サイドバー</title> |
7 | 7 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
@@ -1,7 +1,7 @@ | ||
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | 2 | |
3 | -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
4 | -<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"> | |
3 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
4 | +<html xmlns="https://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"> | |
5 | 5 | <head> |
6 | 6 | <title>iutest - Twilio</title> |
7 | 7 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
@@ -16,7 +16,7 @@ | ||
16 | 16 | |
17 | 17 | <h2>iutwilio</h2> |
18 | 18 | <div class="text_block"> |
19 | -<a href="http://twilio.kddi-web.com/">Twilio</a> を利用しテスト結果を電話やSMSで通知できます。<br /> | |
19 | +<a href="https://twilio.kddi-web.com/">Twilio</a> を利用しテスト結果を電話やSMSで通知できます。<br /> | |
20 | 20 | </div> |
21 | 21 | |
22 | 22 | <h2>使い方</h2> |
@@ -1,7 +1,7 @@ | ||
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | 2 | |
3 | -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
4 | -<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"> | |
3 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
4 | +<html xmlns="https://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"> | |
5 | 5 | <head> |
6 | 6 | <title>iutest - Wandbox</title> |
7 | 7 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
@@ -16,7 +16,7 @@ | ||
16 | 16 | |
17 | 17 | <h2>iuwandbox</h2> |
18 | 18 | <div class="text_block"> |
19 | -<a href="http://melpon.org/wandbox/">Wandbox</a> で iutest を使ったテストコードを書けるように対応しました。<br /> | |
19 | +<a href="https://melpon.org/wandbox/">Wandbox</a> で iutest を使ったテストコードを書けるように対応しました。<br /> | |
20 | 20 | 様々なコンパイラー・バージョンでビルド・テストができるため、あなたのプログラムのコンパイラー対応を助けます。<br /> |
21 | 21 | </div> |
22 | 22 |
@@ -55,7 +55,7 @@ | ||
55 | 55 | |
56 | 56 | サンプルの実行結果はこちらになります。<br /> |
57 | 57 | <img src="./images/iuwandbox_sample.png" alt="サンプル実行結果" /> |
58 | -<a href="http://melpon.org/wandbox/permlink/VspJQN4s3NzUR3C9" target="_blank">http://melpon.org/wandbox/permlink/VspJQN4s3NzUR3C9</a><br /> | |
58 | +<a href="https://melpon.org/wandbox/permlink/VspJQN4s3NzUR3C9" target="_blank">https://melpon.org/wandbox/permlink/VspJQN4s3NzUR3C9</a><br /> | |
59 | 59 | <br /> |
60 | 60 | コンパイラーの選択などは後述のコマンドラインオプションの項をご覧ください。<br /> |
61 | 61 | </div> |
@@ -72,7 +72,7 @@ | ||
72 | 72 | <tr><td> </td><td>--cpp-verbose </td><td>Wandbox の Verbose を有効にします。</td></tr> |
73 | 73 | <tr><td> </td><td>--optimize </td><td>Wandbox の Optimization を有効します。</td></tr> |
74 | 74 | <tr><td> </td><td>--sprout </td><td><a href="https://github.com/bolero-MURAKAMI/Sprout">Sprout</a> を使用します。</td></tr> |
75 | -<tr><td> </td><td>--msgpack </td><td><a href="http://msgpack.org/">MessagePack</a> を使用します。</td></tr> | |
75 | +<tr><td> </td><td>--msgpack </td><td><a href="https://msgpack.org/">MessagePack</a> を使用します。</td></tr> | |
76 | 76 | <tr><td>-f</td><td>--compiler-options-raw OPTIONS</td><td>コンパイラーのオプションを直接指定します。複数のオプションを指定する場合は、[ -f"-Dx=hogefuga -O3" ] とするか、[ -f"-Dx=hogefuga" -f"-O3" ] のように記述できます。 </td></tr> |
77 | 77 | <tr><td>-r</td><td>--runtime-options-raw OPTIONS</td><td>ビルドした実行ファイルのコマンドラインオプションを指定します。複数のオプションを指定する場合は、[ -r"--iutest_shuffle --iutest_random_seed=1" ] とするか、[ -r"--iutest_shuffle" -r"--iutest_random_seed=1" ] のように複数オプションを記述してください。 </td></tr> |
78 | 78 | <tr><td> </td><td>--iutest-use-main </td><td>-DIUTEST_USE_MAIN をコンパイルオプションにつけます。main 関数の記述が省略できます。</td></tr> |
@@ -455,7 +455,7 @@ | ||
455 | 455 | # define IUTEST_HAS_VARIADIC_TEMPLATES 1 |
456 | 456 | # endif |
457 | 457 | # elif defined(__GNUC__) |
458 | -// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35722 | |
458 | +// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35722 | |
459 | 459 | # if defined(__VARIADIC_TEMPLATES) \ |
460 | 460 | || ( ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7))) && defined(__GXX_EXPERIMENTAL_CXX0X__) ) |
461 | 461 | # define IUTEST_HAS_VARIADIC_TEMPLATES 1 |
@@ -1397,7 +1397,7 @@ | ||
1397 | 1397 | */ |
1398 | 1398 | |
1399 | 1399 | #if defined(_MSC_VER) |
1400 | -// http://stackoverflow.com/questions/14487241/avoiding-an-inheritance-by-dominance-warning-for-a-mocked-stdfstream-class | |
1400 | +// https://stackoverflow.com/questions/14487241/avoiding-an-inheritance-by-dominance-warning-for-a-mocked-stdfstream-class | |
1401 | 1401 | # define IUTEST_WORKAROUND_MSC_STLSTREAM_C4250() \ |
1402 | 1402 | void _Add_vtordisp1() {} \ |
1403 | 1403 | void _Add_vtordisp2() {} |
@@ -209,7 +209,7 @@ | ||
209 | 209 | #if IUTEST_HAS_RTTI |
210 | 210 | ::std::string name = MakeIndexTestName(basename, index); |
211 | 211 | name += "/"; |
212 | - name += GetTypeName<T>(); | |
212 | + name += GetTypeNameProxy<T>::GetTypeNameProxy(); | |
213 | 213 | return name; |
214 | 214 | #else |
215 | 215 | return MakeIndexTestName(basename, index); |
@@ -204,6 +204,10 @@ | ||
204 | 204 | { |
205 | 205 | return false; |
206 | 206 | } |
207 | + if( fflush(m_fp) != 0 ) | |
208 | + { | |
209 | + return false; | |
210 | + } | |
207 | 211 | return true; |
208 | 212 | } |
209 | 213 |
@@ -6,7 +6,7 @@ | ||
6 | 6 | * |
7 | 7 | * @author t.shirayanagi |
8 | 8 | * @par copyright |
9 | - * Copyright (C) 2011-2019, Takazumi Shirayanagi\n | |
9 | + * Copyright (C) 2011-2020, Takazumi Shirayanagi\n | |
10 | 10 | * This software is released under the new BSD License, |
11 | 11 | * see LICENSE |
12 | 12 | */ |
@@ -271,7 +271,7 @@ | ||
271 | 271 | |
272 | 272 | #if defined(__clang__) && defined(IUTEST_LIBSTDCXX_VERSION) && IUTEST_LIBSTDCXX_VERSION >= 40900 |
273 | 273 | #if IUTEST_HAS_RVALUE_REFS |
274 | - // http://stackoverflow.com/questions/23374953/why-does-this-exceed-the-maximum-recursive-template-depth | |
274 | + // https://stackoverflow.com/questions/23374953/why-does-this-exceed-the-maximum-recursive-template-depth | |
275 | 275 | iuValueArray(const iuValueArray& rhs) |
276 | 276 | : v(rhs.v) {} |
277 | 277 | iuValueArray(iuValueArray&& rhs) |
@@ -6,7 +6,7 @@ | ||
6 | 6 | * |
7 | 7 | * @author t.shirayanagi |
8 | 8 | * @par copyright |
9 | - * Copyright (C) 2011-2019, Takazumi Shirayanagi\n | |
9 | + * Copyright (C) 2011-2020, Takazumi Shirayanagi\n | |
10 | 10 | * This software is released under the new BSD License, |
11 | 11 | * see LICENSE |
12 | 12 | */ |
@@ -73,7 +73,7 @@ | ||
73 | 73 | # define IUTEST_BREAK() DebugBreak() |
74 | 74 | # endif |
75 | 75 | # elif defined(IUTEST_OS_MAC) |
76 | -// http://www.cocoawithlove.com/2008/03/break-into-debugger.html | |
76 | +// https://www.cocoawithlove.com/2008/03/break-into-debugger.html | |
77 | 77 | # if defined(__ppc64__) || defined(__ppc__) |
78 | 78 | # define IUTEST_BREAK() __asm__("li r0, 20\nsc\nnop\nli r0, 37\nli r4, 2\nsc\nnop\n" : : : "memory", "r0", "r3", "r4" ) |
79 | 79 | # else |
@@ -362,6 +362,15 @@ | ||
362 | 362 | |
363 | 363 | #endif |
364 | 364 | |
365 | +/** | |
366 | + * @brief 型名の取得 | |
367 | +*/ | |
368 | +template<typename T> | |
369 | +struct GetTypeNameProxy | |
370 | +{ | |
371 | + static ::std::string GetTypeName() { return detail::GetTypeName<T>(); } | |
372 | +}; | |
373 | + | |
365 | 374 | } // end of namespace detail |
366 | 375 | } // end of namespace iutest |
367 | 376 |
@@ -6,7 +6,7 @@ | ||
6 | 6 | * |
7 | 7 | * @author t.shirayanagi |
8 | 8 | * @par copyright |
9 | - * Copyright (C) 2012-2019, Takazumi Shirayanagi\n | |
9 | + * Copyright (C) 2012-2020, Takazumi Shirayanagi\n | |
10 | 10 | * This software is released under the new BSD License, |
11 | 11 | * see LICENSE |
12 | 12 | */ |
@@ -80,51 +80,54 @@ | ||
80 | 80 | #if IUTEST_HAS_CXX11 |
81 | 81 | # if IUTEST_LIBSTDCXX_VERSION >= 60100 |
82 | 82 | # if !defined(IUTEST_HAS_STD_INVOKE) && IUTEST_HAS_CXX1Z |
83 | -# define IUTEST_HAS_STD_INVOKE 1 | |
83 | +# define IUTEST_HAS_STD_INVOKE 1 | |
84 | 84 | # endif |
85 | 85 | # endif |
86 | 86 | # if IUTEST_LIBSTDCXX_VERSION >= 50100 |
87 | 87 | # if !defined(IUTEST_HAS_CXX_HDR_CODECVT) |
88 | -# define IUTEST_HAS_CXX_HDR_CODECVT 1 | |
88 | +# define IUTEST_HAS_CXX_HDR_CODECVT 1 | |
89 | 89 | # endif |
90 | 90 | # endif |
91 | 91 | # if IUTEST_LIBSTDCXX_VERSION >= 40900 |
92 | 92 | # if !defined(IUTEST_HAS_CXX_HDR_REGEX) |
93 | -# define IUTEST_HAS_CXX_HDR_REGEX 1 | |
93 | +# define IUTEST_HAS_CXX_HDR_REGEX 1 | |
94 | 94 | # endif |
95 | 95 | # endif |
96 | 96 | # if IUTEST_LIBSTDCXX_VERSION >= 40700 |
97 | 97 | # if !defined(IUTEST_HAS_STD_EMPLACE) |
98 | -# define IUTEST_HAS_STD_EMPLACE 1 | |
98 | +# define IUTEST_HAS_STD_EMPLACE 1 | |
99 | 99 | # endif |
100 | 100 | # if !defined(IUTEST_HAS_CXX_HDR_CHRONO) |
101 | -# define IUTEST_HAS_CXX_HDR_CHRONO 1 | |
101 | +# define IUTEST_HAS_CXX_HDR_CHRONO 1 | |
102 | 102 | # endif |
103 | 103 | # endif |
104 | 104 | # if IUTEST_LIBSTDCXX_VERSION >= 40600 |
105 | 105 | # if !defined(IUTEST_HAS_STD_BEGIN_END) |
106 | -# define IUTEST_HAS_STD_BEGIN_END 1 | |
106 | +# define IUTEST_HAS_STD_BEGIN_END 1 | |
107 | 107 | # endif |
108 | 108 | # endif |
109 | 109 | # if IUTEST_LIBSTDCXX_VERSION >= 40500 |
110 | 110 | # if !defined(IUTEST_HAS_STD_DECLVAL) |
111 | -# define IUTEST_HAS_STD_DECLVAL 1 | |
111 | +# define IUTEST_HAS_STD_DECLVAL 1 | |
112 | 112 | # endif |
113 | 113 | # if !defined(IUTEST_HAS_CXX_HDR_RANDOM) |
114 | -# define IUTEST_HAS_CXX_HDR_RANDOM 1 | |
114 | +# define IUTEST_HAS_CXX_HDR_RANDOM 1 | |
115 | 115 | # endif |
116 | 116 | # if !defined(IUTEST_HAS_CXX_HDR_CSTDINT) |
117 | -# define IUTEST_HAS_CXX_HDR_CSTDINT 1 | |
117 | +# define IUTEST_HAS_CXX_HDR_CSTDINT 1 | |
118 | 118 | # endif |
119 | 119 | # endif |
120 | 120 | # if IUTEST_LIBSTDCXX_VERSION >= 40300 |
121 | 121 | # if !defined(IUTEST_HAS_CXX_HDR_ARRAY) |
122 | -# define IUTEST_HAS_CXX_HDR_ARRAY 1 | |
122 | +# define IUTEST_HAS_CXX_HDR_ARRAY 1 | |
123 | 123 | # endif |
124 | +# if !defined(IUTEST_HAS_STD_TUPLE) | |
125 | +# define IUTEST_HAS_STD_TUPLE 1 | |
126 | +# endif | |
124 | 127 | # endif |
125 | 128 | # if defined(_GLIBCXX_HAVE_QUICK_EXIT) && defined(_GLIBCXX_HAVE_AT_QUICK_EXIT) |
126 | 129 | # if !defined(IUTEST_HAS_STD_QUICK_EXIT) |
127 | -# define IUTEST_HAS_STD_QUICK_EXIT 1 | |
130 | +# define IUTEST_HAS_STD_QUICK_EXIT 1 | |
128 | 131 | # endif |
129 | 132 | # endif |
130 | 133 | # if defined(__has_include) |
@@ -136,24 +139,21 @@ | ||
136 | 139 | # endif |
137 | 140 | #endif |
138 | 141 | |
139 | -// tuple | |
140 | -#if IUTEST_HAS_VARIADIC_TEMPLATES | |
141 | -# if !defined(IUTEST_HAS_STD_TUPLE) | |
142 | -# define IUTEST_HAS_STD_TUPLE 1 | |
142 | +#if !defined(IUTEST_HAS_STD_TUPLE) | |
143 | +# if (!defined(__CUDACC__) && !defined(__ARMCC_VERSION) && (IUTEST_LIBSTDCXX_VERSION >= 40000)) | |
144 | +# if !defined(IUTEST_HAS_TR1_TUPLE) | |
145 | +# define IUTEST_HAS_TR1_TUPLE 1 | |
146 | +# endif | |
143 | 147 | # endif |
144 | -#elif (!defined(__CUDACC__) && !defined(__ARMCC_VERSION) && (IUTEST_LIBSTDCXX_VERSION >= 40000)) | |
145 | -# if !defined(IUTEST_HAS_TR1_TUPLE) | |
146 | -# define IUTEST_HAS_TR1_TUPLE 1 | |
147 | -# endif | |
148 | 148 | #endif |
149 | 149 | |
150 | 150 | #if !defined(IUTEST_HAS_HDR_CXXABI) |
151 | 151 | # if defined(__has_include) |
152 | 152 | # if __has_include( <cxxabi.h> ) |
153 | -# define IUTEST_HAS_HDR_CXXABI 1 | |
153 | +# define IUTEST_HAS_HDR_CXXABI 1 | |
154 | 154 | # endif |
155 | 155 | # else |
156 | -# define IUTEST_HAS_HDR_CXXABI 1 | |
156 | +# define IUTEST_HAS_HDR_CXXABI 1 | |
157 | 157 | # endif |
158 | 158 | #endif |
159 | 159 |
@@ -202,6 +202,9 @@ | ||
202 | 202 | # if !defined(IUTEST_HAS_CXX_HDR_CUCHAR) && __has_include( <cuchar> ) |
203 | 203 | # define IUTEST_HAS_CXX_HDR_CUCHAR 1 |
204 | 204 | # endif |
205 | +# if !defined(IUTEST_HAS_STD_TUPLE) && __has_include( <tuple> ) | |
206 | +# define IUTEST_HAS_STD_TUPLE 1 | |
207 | +# endif | |
205 | 208 | # endif |
206 | 209 | #endif |
207 | 210 |
@@ -219,20 +222,12 @@ | ||
219 | 222 | # endif |
220 | 223 | #endif |
221 | 224 | |
222 | -// tuple | |
223 | -#if IUTEST_HAS_VARIADIC_TEMPLATES | |
224 | -# if !defined(IUTEST_HAS_STD_TUPLE) | |
225 | -# define IUTEST_HAS_STD_TUPLE 1 | |
225 | +#if defined(__has_include) | |
226 | +# if !defined(IUTEST_HAS_STD_TUPLE) && !defined(IUTEST_HAS_TR1_TUPLE) && __has_include( <tr1/tuple> ) | |
227 | +# define IUTEST_HAS_TR1_TUPLE 1 | |
226 | 228 | # endif |
227 | -#elif defined(__has_include) | |
228 | -# if !defined(IUTEST_HAS_TR1_TUPLE) && __has_include( <tr1/tuple> ) | |
229 | -# define IUTEST_HAS_TR1_TUPLE 1 | |
230 | -# endif | |
231 | -#endif | |
232 | - | |
233 | -#if defined(__has_include) | |
234 | 229 | # if !defined(IUTEST_HAS_HDR_CXXABI) && __has_include( <cxxabi.h> ) |
235 | -# define IUTEST_HAS_HDR_CXXABI 1 | |
230 | +# define IUTEST_HAS_HDR_CXXABI 1 | |
236 | 231 | # endif |
237 | 232 | #endif |
238 | 233 |
@@ -399,7 +394,7 @@ | ||
399 | 394 | #endif |
400 | 395 | /** |
401 | 396 | * @brief has codecvt header |
402 | - * @note P0618R0 Deprecating <codecvt>: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0618r0.html | |
397 | + * @note P0618R0 Deprecating <codecvt>: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0618r0.html | |
403 | 398 | * @deprecated |
404 | 399 | */ |
405 | 400 | #if !defined(IUTEST_HAS_CXX_HDR_CODECVT) |
@@ -809,6 +804,16 @@ | ||
809 | 804 | # define IUPRzu "zu" |
810 | 805 | #endif |
811 | 806 | |
807 | +#if !defined(iu_va_copy) | |
808 | +# if defined(va_copy) | |
809 | +# define iu_va_copy va_copy | |
810 | +# elif defined(__GNUC__) || defined(__clang__) | |
811 | +# define iu_va_copy(dest, src) __builtin_va_copy(dest, src) | |
812 | +# else | |
813 | +# define iu_va_copy(dest, src) (dest = src) | |
814 | +# endif | |
815 | +#endif | |
816 | + | |
812 | 817 | namespace iutest { |
813 | 818 | namespace detail |
814 | 819 | { |
@@ -6,7 +6,7 @@ | ||
6 | 6 | * |
7 | 7 | * @author t.shirayanagi |
8 | 8 | * @par copyright |
9 | - * Copyright (C) 2012-2019, Takazumi Shirayanagi\n | |
9 | + * Copyright (C) 2012-2020, Takazumi Shirayanagi\n | |
10 | 10 | * This software is released under the new BSD License, |
11 | 11 | * see LICENSE |
12 | 12 | */ |
@@ -15,6 +15,8 @@ | ||
15 | 15 | #ifndef INCG_IRIS_IUTEST_STREAM_HPP_3A4AF139_9F24_4730_81D0_DADFCE6DCF99_ |
16 | 16 | #define INCG_IRIS_IUTEST_STREAM_HPP_3A4AF139_9F24_4730_81D0_DADFCE6DCF99_ |
17 | 17 | |
18 | +#include "iutest_string.hpp" | |
19 | + | |
18 | 20 | namespace iutest { |
19 | 21 | namespace detail |
20 | 22 | { |
@@ -34,26 +36,13 @@ | ||
34 | 36 | public: |
35 | 37 | virtual int Printf(const char* fmt, ...) IUTEST_ATTRIBUTE_FORMAT_PRINTF(2, 3) |
36 | 38 | { |
37 | -IUTEST_PRAGMA_CRT_SECURE_WARN_DISABLE_BEGIN() | |
38 | - | |
39 | - // TODO : Fixed buffer... | |
40 | - char buf[1024] = {0}; | |
41 | 39 | va_list va; |
42 | 40 | va_start(va, fmt); |
43 | - const int len = iu_vsnprintf(buf, sizeof(buf)-1, fmt, va); | |
41 | + const ::std::string str = StringFormat(fmt, va); | |
44 | 42 | va_end(va); |
45 | - | |
46 | - if( len > 0 ) | |
47 | - { | |
48 | - Write(buf, static_cast<size_t>(len), 1); | |
49 | - } | |
50 | - else | |
51 | - { | |
52 | - IUTEST_LOG_(WARNING) << "stream output trancated: " << fmt; | |
53 | - } | |
54 | - return len; | |
55 | - | |
56 | -IUTEST_PRAGMA_CRT_SECURE_WARN_DISABLE_END() | |
43 | + const size_t len = str.length(); | |
44 | + Write(str.c_str(), len, 1); | |
45 | + return static_cast<int>(len); | |
57 | 46 | } |
58 | 47 | }; |
59 | 48 |
@@ -2,11 +2,11 @@ | ||
2 | 2 | //----------------------------------------------------------------------- |
3 | 3 | /** |
4 | 4 | * @file iutest_string.hpp |
5 | - * @brief iris unit test 文字列操作 ファイル | |
5 | + * @brief iris unit test string utilities | |
6 | 6 | * |
7 | 7 | * @author t.shirayanagi |
8 | 8 | * @par copyright |
9 | - * Copyright (C) 2011-2019, Takazumi Shirayanagi\n | |
9 | + * Copyright (C) 2011-2020, Takazumi Shirayanagi\n | |
10 | 10 | * This software is released under the new BSD License, |
11 | 11 | * see LICENSE |
12 | 12 | */ |
@@ -47,6 +47,7 @@ | ||
47 | 47 | { |
48 | 48 | |
49 | 49 | ::std::string StringFormat(const char* format, ...) IUTEST_ATTRIBUTE_FORMAT_PRINTF(1, 2); |
50 | +::std::string StringFormat(const char* format, va_list va) IUTEST_ATTRIBUTE_FORMAT_PRINTF(1, 0); | |
50 | 51 | |
51 | 52 | namespace wrapper |
52 | 53 | { |
@@ -143,13 +144,16 @@ | ||
143 | 144 | |
144 | 145 | inline int iu_vsnprintf(char* dst, size_t size, const char* format, va_list va) |
145 | 146 | { |
146 | - char buffer[4096]; | |
147 | - const int ret = vsprintf(buffer, format, va); | |
147 | + char buffer[4096] = {0}; | |
148 | + char* write_buffer = dst != NULL && size >= 4096 ? dst : buffer; | |
149 | + const int ret = vsprintf(write_buffer, format, va); | |
148 | 150 | if( dst != NULL ) |
149 | 151 | { |
150 | 152 | const size_t length = static_cast<size_t>(ret); |
151 | 153 | const size_t write = (size <= length) ? size - 1 : length; |
152 | - strncpy(dst, buffer, write); | |
154 | + if( write_buffer == buffer ) { | |
155 | + strncpy(dst, buffer, write); | |
156 | + } | |
153 | 157 | dst[write] = '\0'; |
154 | 158 | } |
155 | 159 | return ret; |
@@ -451,12 +455,20 @@ | ||
451 | 455 | |
452 | 456 | inline ::std::string StringFormat(const char* format, ...) |
453 | 457 | { |
458 | + va_list va; | |
459 | + va_start(va, format); | |
460 | + ::std::string str = StringFormat(format, va); | |
461 | + va_end(va); | |
462 | + return str; | |
463 | +} | |
464 | +inline ::std::string StringFormat(const char* format, va_list va) | |
465 | +{ | |
454 | 466 | size_t n = strlen(format) * 2 + 1; |
455 | 467 | { |
456 | - va_list va; | |
457 | - va_start(va, format); | |
458 | - const size_t ret = iu_vsnprintf(NULL, 0, format, va); | |
459 | - va_end(va); | |
468 | + va_list va2; | |
469 | + iu_va_copy(va2, va); // cppcheck-suppress va_list_usedBeforeStarted | |
470 | + const size_t ret = iu_vsnprintf(NULL, 0, format, va2); | |
471 | + va_end(va2); | |
460 | 472 | if( ret > 0 ) |
461 | 473 | { |
462 | 474 | n = ret + 1; |
@@ -465,10 +477,10 @@ | ||
465 | 477 | for( ;; ) |
466 | 478 | { |
467 | 479 | char* dst = new char[n]; |
468 | - va_list va; | |
469 | - va_start(va, format); | |
470 | - const int written = iu_vsnprintf(dst, n, format, va); | |
471 | - va_end(va); | |
480 | + va_list va2; | |
481 | + iu_va_copy(va2, va); // cppcheck-suppress va_list_usedBeforeStarted | |
482 | + const int written = iu_vsnprintf(dst, n, format, va2); | |
483 | + va_end(va2); | |
472 | 484 | if( written < 0 ) |
473 | 485 | { |
474 | 486 | #if defined(EOVERFLOW) |
@@ -54,16 +54,35 @@ | ||
54 | 54 | |
55 | 55 | #undef IIUT_DECL_DEFAULT_ARG_ |
56 | 56 | |
57 | +#define IIUT_DECL_TYPES_CONCATTYPENAME_(i, param) GetTypeNameProxy<IUTEST_PP_CAT(param, i)>::GetTypeName() + ", " + | |
58 | +#define IIUT_DECL_TYPES_GETTYPENAME_I_(n, m) \ | |
59 | + template<IUTEST_PP_ENUM_PARAMS(n, typename T)>struct \ | |
60 | + GetTypeNameProxy<Types< IUTEST_PP_ENUM_PARAMS(n, T) \ | |
61 | + , IUTEST_PP_ENUM(m, IIUT_DECL_SPEC_NONE_, detail::None)> > { \ | |
62 | + static ::std::string GetTypeName() { \ | |
63 | + ::std::string name = "iutest::Types<"; \ | |
64 | + name += IUTEST_PP_REPEAT(IUTEST_PP_DEC(n), IIUT_DECL_TYPES_CONCATTYPENAME_, T) \ | |
65 | + GetTypeNameProxy<IUTEST_PP_CAT(T, IUTEST_PP_DEC(n))>::GetTypeName() + ">"; \ | |
66 | + return name; \ | |
67 | + } \ | |
68 | + } | |
69 | +#define IIUT_DECL_TYPES_GETTYPENAME_(n, m) \ | |
70 | + namespace detail { \ | |
71 | + IIUT_DECL_TYPES_GETTYPENAME_I_(n, m); \ | |
72 | + } | |
73 | + | |
57 | 74 | #define IIUT_DECL_SPEC_NONE_(i, param) param |
58 | -#define IIUT_DECL_TYPES_(n, m) \ | |
59 | - template< IUTEST_PP_ENUM_PARAMS(n, typename T) > \ | |
60 | - struct Types< IUTEST_PP_ENUM_PARAMS(n, T) \ | |
75 | +#define IIUT_DECL_TYPES_(n, m) \ | |
76 | + IIUT_DECL_TYPES_GETTYPENAME_(n, m) \ | |
77 | + template< IUTEST_PP_ENUM_PARAMS(n, typename T) > \ | |
78 | + struct Types< IUTEST_PP_ENUM_PARAMS(n, T) \ | |
61 | 79 | , IUTEST_PP_ENUM(m, IIUT_DECL_SPEC_NONE_, detail::None) > { \ |
62 | - typedef IUTEST_PP_CAT(detail::TypeList, n)< \ | |
63 | - IUTEST_PP_ENUM_PARAMS(n, T) > type; \ | |
80 | + typedef IUTEST_PP_CAT(detail::TypeList, n)< \ | |
81 | + IUTEST_PP_ENUM_PARAMS(n, T) > type; \ | |
64 | 82 | template<size_t N>struct get : public detail::typelist_get<type, N> {}; \ |
65 | 83 | } |
66 | 84 | |
85 | + | |
67 | 86 | template<> |
68 | 87 | struct Types< IUTEST_PP_ENUM(50, IIUT_DECL_SPEC_NONE_, detail::None) > |
69 | 88 | { |
@@ -120,6 +139,9 @@ | ||
120 | 139 | IIUT_DECL_TYPES_(48, 2); |
121 | 140 | IIUT_DECL_TYPES_(49, 1); |
122 | 141 | |
142 | +#undef IIUT_DECL_TYPES_CONCATTYPENAME_ | |
143 | +#undef IIUT_DECL_TYPES_GETTYPENAME_I_ | |
144 | +#undef IIUT_DECL_TYPES_GETTYPENAME_ | |
123 | 145 | #undef IIUT_DECL_SPEC_NONE_ |
124 | 146 | #undef IIUT_DECL_TYPES_ |
125 | 147 |
@@ -279,7 +279,7 @@ | ||
279 | 279 | */ |
280 | 280 | TypedTestCase(const ::std::string& testcase_name, TestTypeId id, SetUpMethod setup, TearDownMethod teardown) |
281 | 281 | : TestCase(testcase_name, id, setup, teardown) |
282 | - , m_type_param(detail::GetTypeName<TypeParam>()) | |
282 | + , m_type_param(detail::GetTypeNameProxy<TypeParam>::GetTypeName()) | |
283 | 283 | { |
284 | 284 | } |
285 | 285 |
@@ -227,7 +227,7 @@ | ||
227 | 227 | |
228 | 228 | #if !defined(IUTEST_HAS_VARIADIC_COMBINE) |
229 | 229 | //! 可変長引数に対応した ::iutest::Combine が使用可能かどうか |
230 | -# if IUTEST_HAS_COMBINE && IUTEST_HAS_VARIADIC_TEMPLATES && IUTEST_HAS_TUPLE | |
230 | +# if IUTEST_HAS_COMBINE && IUTEST_HAS_VARIADIC_TEMPLATES && IUTEST_HAS_STD_TUPLE | |
231 | 231 | # define IUTEST_HAS_VARIADIC_COMBINE 1 |
232 | 232 | # else |
233 | 233 | # define IUTEST_HAS_VARIADIC_COMBINE 0 |
@@ -236,7 +236,7 @@ | ||
236 | 236 | |
237 | 237 | #if !defined(IUTEST_HAS_VARIADIC_PAIRWISE) |
238 | 238 | //! 可変長引数に対応した ::iutest::Pairwise が使用可能かどうか |
239 | -# if IUTEST_HAS_PAIRWISE && IUTEST_HAS_VARIADIC_TEMPLATES && IUTEST_HAS_TUPLE | |
239 | +# if IUTEST_HAS_PAIRWISE && IUTEST_HAS_VARIADIC_TEMPLATES && IUTEST_HAS_STD_TUPLE | |
240 | 240 | # define IUTEST_HAS_VARIADIC_PAIRWISE 1 |
241 | 241 | # else |
242 | 242 | # define IUTEST_HAS_VARIADIC_PAIRWISE 0 |
@@ -6,7 +6,7 @@ | ||
6 | 6 | * |
7 | 7 | * @author t.shirayanagi |
8 | 8 | * @par copyright |
9 | - * Copyright (C) 2011-2019, Takazumi Shirayanagi\n | |
9 | + * Copyright (C) 2011-2020, Takazumi Shirayanagi\n | |
10 | 10 | * This software is released under the new BSD License, |
11 | 11 | * see LICENSE |
12 | 12 | */ |
@@ -208,7 +208,7 @@ | ||
208 | 208 | |
209 | 209 | /** |
210 | 210 | * @brief 浮動小数点数がほぼ一致するかどうか |
211 | - * @sa http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm | |
211 | + * @sa https://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm | |
212 | 212 | */ |
213 | 213 | bool NanSensitiveAlmostEquals(const _Myt& rhs) const |
214 | 214 | { |
@@ -1195,7 +1195,7 @@ | ||
1195 | 1195 | { |
1196 | 1196 | iu_global_format_stringstream strm; |
1197 | 1197 | strm << "Field: " << m_expected; |
1198 | - //strm << "Field: (" << detail::GetTypeName<F>() << ") " << m_expected; | |
1198 | + //strm << "Field: (" << detail::GetTypeNameProxy<F>::GetTypeName() << ") " << m_expected; | |
1199 | 1199 | return strm.str(); |
1200 | 1200 | } |
1201 | 1201 | private: |
@@ -1250,7 +1250,7 @@ | ||
1250 | 1250 | { |
1251 | 1251 | iu_global_format_stringstream strm; |
1252 | 1252 | strm << "Property: " << m_expected; |
1253 | - //strm << "Property: (" << detail::GetTypeName<F>() << ") " << m_expected; | |
1253 | + //strm << "Property: (" << detail::GetTypeNameProxy<F>::GetTypeName() << ") " << m_expected; | |
1254 | 1254 | return strm.str(); |
1255 | 1255 | } |
1256 | 1256 | private: |
@@ -1380,7 +1380,7 @@ | ||
1380 | 1380 | { |
1381 | 1381 | iu_global_format_stringstream strm; |
1382 | 1382 | strm << "Result of: " << m_expected; |
1383 | - //strm << "Result of " << detail::GetTypeName<F>() << "(): " << m_expected; | |
1383 | + //strm << "Result of " << detail::GetTypeNameProxy<F>::GetTypeName() << "(): " << m_expected; | |
1384 | 1384 | return strm.str(); |
1385 | 1385 | } |
1386 | 1386 | private: |
@@ -1481,7 +1481,7 @@ | ||
1481 | 1481 | ::std::string WhichIs() const IUTEST_CXX_OVERRIDE |
1482 | 1482 | { |
1483 | 1483 | iu_global_format_stringstream strm; |
1484 | - strm << "A: " << detail::GetTypeName<T>(); | |
1484 | + strm << "A: " << detail::GetTypeNameProxy<T>::GetTypeName(); | |
1485 | 1485 | return strm.str(); |
1486 | 1486 | } |
1487 | 1487 | }; |
@@ -17,11 +17,11 @@ | ||
17 | 17 | |
18 | 18 | //====================================================================== |
19 | 19 | // define |
20 | -#define IUTEST_VER 0x01170005u //!< iutest version 1.17.0.5 | |
20 | +#define IUTEST_VER 0x01170007u //!< iutest version 1.17.0.7 | |
21 | 21 | #define IUTEST_MAJORVER 0x01u //!< Major Version |
22 | 22 | #define IUTEST_MINORVER 0x17u //!< Minor Version |
23 | 23 | #define IUTEST_MICROVER 0x00u //!< Micro Version |
24 | -#define IUTEST_REVISION 0x05u //!< Revision | |
24 | +#define IUTEST_REVISION 0x07u //!< Revision | |
25 | 25 | |
26 | 26 | #define IUTEST_BUILD IUTEST_MICROVER //!< @deprecated |
27 | 27 |
@@ -28,7 +28,7 @@ | ||
28 | 28 | /** |
29 | 29 | * @mainpage |
30 | 30 | * @sa @b ProjectHome \n |
31 | - * OSDN : http://osdn.jp/projects/iutest/ \n | |
31 | + * OSDN : https://osdn.jp/projects/iutest/ \n | |
32 | 32 | * github : https://github.com/srz-zumix/iutest \n |
33 | 33 | * google group: https://groups.google.com/forum/?fromgroups#!forum/g-iutest \n |
34 | 34 | * |
@@ -65,7 +65,7 @@ | ||
65 | 65 | */ |
66 | 66 | |
67 | 67 | /** |
68 | - * @page CMDLINE コマンドラインオプション | |
68 | + * @page cmdline コマンドラインオプション | |
69 | 69 | * @par Command Line Options |
70 | 70 | <table> |
71 | 71 | <tr><td>--help, -h </td><td></td><td>Generate help message.</td></tr> |
@@ -96,7 +96,7 @@ | ||
96 | 96 | */ |
97 | 97 | |
98 | 98 | /** |
99 | - * @page ENVIRONMENT_OPTIONS 環境変数オプション | |
99 | + * @page environmentoptions 環境変数オプション | |
100 | 100 | * @par Environment variable Options |
101 | 101 | <table> |
102 | 102 | <tr><td>IUTEST_OUTPUT=xml|junit[:path] </td><td>Path of xml report.</td></tr> |
@@ -118,7 +118,7 @@ | ||
118 | 118 | */ |
119 | 119 | |
120 | 120 | /** |
121 | - * @page CHANGELOG 変更履歴 | |
121 | + * @page changelog 変更履歴 | |
122 | 122 | * @par Changes |
123 | 123 | <ul> |
124 | 124 | <li>v1.17.1.0 |
@@ -2,7 +2,7 @@ | ||
2 | 2 | |
3 | 3 | language: python |
4 | 4 | |
5 | -python: 2.7 | |
5 | +python: 3.7 | |
6 | 6 | cache: true |
7 | 7 | parallelized_test: true |
8 | 8 |
@@ -34,7 +34,8 @@ | ||
34 | 34 | env: |
35 | 35 | matrix: |
36 | 36 | - WANDBOX_COMPILER=gcc-head |
37 | - - WANDBOX_COMPILER=gcc-9.2.0 | |
37 | + - WANDBOX_COMPILER=gcc-9.3.0 | |
38 | + # - WANDBOX_COMPILER=gcc-9.2.0 | |
38 | 39 | # - WANDBOX_COMPILER=gcc-9.1.0 |
39 | 40 | - WANDBOX_COMPILER=gcc-8.3.0 |
40 | 41 | # - WANDBOX_COMPILER=gcc-8.2.0 |
@@ -65,6 +66,7 @@ | ||
65 | 66 | - WANDBOX_COMPILER=gcc-4.5.4 |
66 | 67 | - WANDBOX_COMPILER=gcc-4.4.7 |
67 | 68 | - WANDBOX_COMPILER=clang-head IUWANDBOX_ADD_OPTION=-f"-Wno-c++11-inline-namespace" |
69 | + - WANDBOX_COMPILER=clang-10.0.0 | |
68 | 70 | - WANDBOX_COMPILER=clang-9.0.0 |
69 | 71 | - WANDBOX_COMPILER=clang-8.0.0 |
70 | 72 | - WANDBOX_COMPILER=clang-7.0.0 |
@@ -168,6 +168,7 @@ | ||
168 | 168 | $(OUTDIR)/flagfile_tests \ |
169 | 169 | $(OUTDIR)/invalid_locale_ctype_tests \ |
170 | 170 | $(OUTDIR)/ostream_formatter_tests \ |
171 | + $(OUTDIR)/output_long_type_param_tests \ | |
171 | 172 | $(OUTDIR)/output_tests \ |
172 | 173 | $(OUTDIR)/output_xml_invalid_path_tests \ |
173 | 174 | $(OUTDIR)/output_xml_repeat_tests \ |
@@ -25,6 +25,8 @@ | ||
25 | 25 | { |
26 | 26 | IUTEST_INIT(&argc, argv); |
27 | 27 | #if !defined(IUTEST_USE_GTEST) |
28 | + ::iutest::IUTEST_FLAG(locale_ctype) = ""; | |
29 | + | |
28 | 30 | IUTEST_LOG_(INFO) << "a"; |
29 | 31 | |
30 | 32 | ::iutest::IUTEST_FLAG(warning_into_error) = false; |
@@ -29,18 +29,12 @@ | ||
29 | 29 | { |
30 | 30 | IUTEST_PRAGMA_CRT_SECURE_WARN_DISABLE_BEGIN() |
31 | 31 | char buf[4096] = { 0 }; |
32 | -#ifdef va_copy | |
33 | 32 | va_list va2; |
34 | - va_copy(va2, va); | |
33 | + iu_va_copy(va2, va); | |
35 | 34 | vsprintf(buf, fmt, va2); |
36 | 35 | va_end(va2); |
37 | 36 | m_log += buf; |
38 | 37 | ::iutest::detail::iuConsole::nl_voutput(fmt, va); |
39 | -#else | |
40 | - vsprintf(buf, fmt, va); | |
41 | - m_log += buf; | |
42 | - ::iutest::detail::iuConsole::nl_output("%s", buf); | |
43 | -#endif | |
44 | 38 | IUTEST_PRAGMA_CRT_SECURE_WARN_DISABLE_END() |
45 | 39 | } |
46 | 40 | void clear(void) { m_log.clear(); } |
@@ -0,0 +1,116 @@ | ||
1 | +//====================================================================== | |
2 | +//----------------------------------------------------------------------- | |
3 | +/** | |
4 | + * @file output_xml_long_type_param_tests.cpp | |
5 | + * @brief xml 出力対応テスト | |
6 | + * | |
7 | + * @author t.shirayanagi | |
8 | + * @par copyright | |
9 | + * Copyright (C) 2020, Takazumi Shirayanagi\n | |
10 | + * This software is released under the new BSD License, | |
11 | + * see LICENSE | |
12 | +*/ | |
13 | +//----------------------------------------------------------------------- | |
14 | +//====================================================================== | |
15 | + | |
16 | +//====================================================================== | |
17 | +// include | |
18 | +#define IUTEST_HAS_VARIADIC_TEMPLATES 0 | |
19 | + | |
20 | +#include "iutest.hpp" | |
21 | + | |
22 | +#if !defined(IUTEST_USE_GTEST) && IUTEST_HAS_STRINGSTREAM && IUTEST_HAS_ASSERTION_RETURN && IUTEST_HAS_TYPED_TEST | |
23 | +# define OUTPUT_XML_TEST 1 | |
24 | +#else | |
25 | +# define OUTPUT_XML_TEST 0 | |
26 | +#endif | |
27 | + | |
28 | +#if OUTPUT_XML_TEST | |
29 | + | |
30 | +class FileIO : public ::iutest::StringStreamFile | |
31 | +{ | |
32 | +public: | |
33 | + static ::std::string s_io; | |
34 | + | |
35 | + virtual void Close() | |
36 | + { | |
37 | + s_io = ss.str(); | |
38 | + } | |
39 | +}; | |
40 | + | |
41 | +::std::string FileIO::s_io; | |
42 | + | |
43 | +template<IUTEST_PP_ENUM_SHIFTED_PARAMS(50, typename A)> | |
44 | +struct TestType {}; | |
45 | + | |
46 | +class TestNone {}; | |
47 | + | |
48 | +typedef TestType<IUTEST_PP_ENUM(50, IIUT_PP_REPEAT_PARAMS_MACRO_, TestNone)> AliasTestType; | |
49 | + | |
50 | +IUTEST_FILESYSTEM_INSTANTIATE(FileIO); | |
51 | + | |
52 | +template<typename T> | |
53 | +class MultiTypedTest : public ::iutest::Test | |
54 | +{ | |
55 | +}; | |
56 | +typedef ::iutest::Types< ::iutest::Types<int, float>, AliasTestType > MultiTypedTestTypes; | |
57 | + | |
58 | +IUTEST_TYPED_TEST_CASE(MultiTypedTest, MultiTypedTestTypes); | |
59 | + | |
60 | +IUTEST_TYPED_TEST(MultiTypedTest, Get) | |
61 | +{ | |
62 | +} | |
63 | + | |
64 | +class HackXmlGeneratorListener : public ::iutest::DefaultXmlGeneratorListener | |
65 | +{ | |
66 | + HackXmlGeneratorListener() : ::iutest::DefaultXmlGeneratorListener("") {} | |
67 | +public: | |
68 | + using DefaultXmlGeneratorListener::EscapeXmlAttribute; | |
69 | + using DefaultXmlGeneratorListener::EscapeXmlText; | |
70 | +}; | |
71 | + | |
72 | +#endif | |
73 | + | |
74 | +#ifdef UNICODE | |
75 | +int wmain(int argc, wchar_t* argv[]) | |
76 | +#else | |
77 | +int main(int argc, char* argv[]) | |
78 | +#endif | |
79 | +{ | |
80 | +#if OUTPUT_XML_TEST | |
81 | + IUTEST_INIT(&argc, argv); | |
82 | + | |
83 | + const ::std::string type_param1 = iutest::detail::GetTypeNameProxy< ::iutest::Types<int, float> >::GetTypeName(); | |
84 | + const ::std::string type_param2 = iutest::detail::GetTypeNameProxy< AliasTestType >::GetTypeName(); | |
85 | + const ::std::string xml_type_param1 = HackXmlGeneratorListener::EscapeXmlAttribute(type_param1); | |
86 | + const ::std::string xml_type_param2 = HackXmlGeneratorListener::EscapeXmlAttribute(type_param2); | |
87 | + | |
88 | + ::iutest::IUTEST_FLAG(output) = "xml:test.xml"; | |
89 | + { | |
90 | + const int ret = IUTEST_RUN_ALL_TESTS(); | |
91 | + | |
92 | + if( ret != 0 ) return 1; | |
93 | + IUTEST_ASSERT_EQ(::std::string::npos, FileIO::s_io.find("iutest::detail::None")) << FileIO::s_io << ::iutest::AssertionReturn<int>(1); | |
94 | + IUTEST_ASSERT_NE(::std::string::npos, FileIO::s_io.find(xml_type_param1)) << FileIO::s_io << ::iutest::AssertionReturn<int>(1); | |
95 | + IUTEST_ASSERT_NE(::std::string::npos, FileIO::s_io.find(xml_type_param2)) << FileIO::s_io << ::iutest::AssertionReturn<int>(1); | |
96 | + FileIO::s_io.clear(); | |
97 | + } | |
98 | + | |
99 | + ::iutest::IUTEST_FLAG(output) = "junit:test.xml"; | |
100 | + { | |
101 | + const int ret = IUTEST_RUN_ALL_TESTS(); | |
102 | + | |
103 | + if( ret != 0 ) return 1; | |
104 | + IUTEST_ASSERT_EQ(::std::string::npos, FileIO::s_io.find("iutest::detail::None")) << FileIO::s_io << ::iutest::AssertionReturn<int>(1); | |
105 | + IUTEST_ASSERT_NE(::std::string::npos, FileIO::s_io.find(xml_type_param1)) << FileIO::s_io << ::iutest::AssertionReturn<int>(1); | |
106 | + IUTEST_ASSERT_NE(::std::string::npos, FileIO::s_io.find(xml_type_param2)) << FileIO::s_io << ::iutest::AssertionReturn<int>(1); | |
107 | + FileIO::s_io.clear(); | |
108 | + } | |
109 | + printf("*** Successful ***\n"); | |
110 | +#else | |
111 | + (void)argc; | |
112 | + (void)argv; | |
113 | + printf("*** OUTPUT_XML_TEST=0 ***\n"); | |
114 | +#endif | |
115 | + return 0; | |
116 | +} |
@@ -0,0 +1,14 @@ | ||
1 | +# | |
2 | +# | |
3 | +# | |
4 | +# Copyright (C) 2020, Takazumi Shirayanagi | |
5 | +# This software is released under the new BSD License, | |
6 | +# see LICENSE | |
7 | + | |
8 | +default: check-fullpath check-remote-crlf | |
9 | + | |
10 | +check-fullpath: | |
11 | + ! find ../../projects -type f -print | xargs grep '[d-zD-Z]:\\' | |
12 | + | |
13 | +check-remote-crlf: | |
14 | + ! git grep --cached -I -l -P '\r' | |
\ No newline at end of file |
@@ -95,8 +95,8 @@ | ||
95 | 95 | #if IUTEST_HAS_STATIC_ASSERT_TYPEEQ |
96 | 96 | ::iutest::StaticAssertTypeEq< Type1, int >(); |
97 | 97 | #endif |
98 | - IUTEST_SUCCEED() << ::iutest::detail::GetTypeName< Type1 >(); | |
99 | - IUTEST_SUCCEED() << ::iutest::detail::GetTypeName< Type2 >(); | |
98 | + IUTEST_SUCCEED() << ::iutest::detail::GetTypeNameProxy< Type1 >::GetTypeName(); | |
99 | + IUTEST_SUCCEED() << ::iutest::detail::GetTypeNameProxy< Type2 >::GetTypeName(); | |
100 | 100 | } |
101 | 101 | |
102 | 102 | #endif |
@@ -749,19 +749,24 @@ | ||
749 | 749 | if 'switches' in d: |
750 | 750 | switches = d['switches'] |
751 | 751 | for s in switches: |
752 | - if 'options' in s: | |
753 | - default_option = s['default'] | |
754 | - print(s['name']) | |
755 | - for o in s['options']: | |
756 | - if o['name'] == default_option: | |
757 | - print(' ' + o['name'] + ' (default)') | |
752 | + try: | |
753 | + if 'options' in s: | |
754 | + default_option = s['default'] | |
755 | + if 'name' in s: | |
756 | + print(s['name']) | |
757 | + for o in s['options']: | |
758 | + if o['name'] == default_option: | |
759 | + print(' ' + o['name'] + ' (default)') | |
760 | + else: | |
761 | + print(' ' + o['name']) | |
762 | + elif 'name' in s: | |
763 | + if s['default']: | |
764 | + print(s['name'] + ' (default)') | |
758 | 765 | else: |
759 | - print(' ' + o['name']) | |
760 | - elif 'name' in s: | |
761 | - if s['default']: | |
762 | - print(s['name'] + ' (default)') | |
763 | - else: | |
764 | - print(s['name']) | |
766 | + print(s['name']) | |
767 | + except KeyError: | |
768 | + print("unknown format:") | |
769 | + print(s) | |
765 | 770 | |
766 | 771 | |
767 | 772 | def get_options(compiler): |
@@ -69,7 +69,10 @@ | ||
69 | 69 | payload = json.dumps(self.parameter) |
70 | 70 | response = requests.post(self.api_url + '/compile.json', data=payload, headers=headers) |
71 | 71 | response.raise_for_status() |
72 | - return response.json() | |
72 | + try: | |
73 | + return response.json() | |
74 | + except json.decoder.JSONDecodeError as e: | |
75 | + raise requests.exceptions.HTTPError(e, response.status_code) | |
73 | 76 | |
74 | 77 | def code(self, code): |
75 | 78 | """ |
@@ -6,7 +6,7 @@ | ||
6 | 6 | # If you want Google's container you would reference google/python |
7 | 7 | # Read more about containers on our dev center |
8 | 8 | # http://devcenter.wercker.com/docs/containers/index.html |
9 | -box: python:2.7 | |
9 | +box: python | |
10 | 10 | # You can also use services such as databases. Read more on our dev center: |
11 | 11 | # http://devcenter.wercker.com/docs/services/index.html |
12 | 12 | # services: |
@@ -25,15 +25,6 @@ | ||
25 | 25 | # Read more about steps on our dev center: |
26 | 26 | # http://devcenter.wercker.com/docs/steps/index.html |
27 | 27 | steps: |
28 | - # A step that sets up the python virtual environment | |
29 | - - virtualenv: | |
30 | - name: setup virtual environment | |
31 | - | |
32 | - # # Use this virtualenv step for python 3.2 | |
33 | - # - virtualenv | |
34 | - # name: setup virtual environment | |
35 | - # python_location: /usr/bin/python3.2 | |
36 | - | |
37 | 28 | # A step that executes `pip install` command. |
38 | 29 | - pip-install: |
39 | 30 | requirements_file: "" |
@@ -59,9 +50,6 @@ | ||
59 | 50 | |
60 | 51 | wandbox: |
61 | 52 | steps: |
62 | - - virtualenv: | |
63 | - name: setup virtual environment | |
64 | - | |
65 | 53 | - pip-install: |
66 | 54 | requirements_file: "" |
67 | 55 | packages_list: "requests" |
@@ -97,9 +85,6 @@ | ||
97 | 85 | |
98 | 86 | wandbox-all-compiler: |
99 | 87 | steps: |
100 | - - virtualenv: | |
101 | - name: setup virtual environment | |
102 | - | |
103 | 88 | - pip-install: |
104 | 89 | requirements_file: "" |
105 | 90 | packages_list: "requests" |