main
parent
d04dfef198
commit
1239070d34
Binary file not shown.
@ -0,0 +1,63 @@
|
||||
###############################################################################
|
||||
# Set default behavior to automatically normalize line endings.
|
||||
###############################################################################
|
||||
* text=auto
|
||||
|
||||
###############################################################################
|
||||
# Set default behavior for command prompt diff.
|
||||
#
|
||||
# This is need for earlier builds of msysgit that does not have it on by
|
||||
# default for csharp files.
|
||||
# Note: This is only used by command line
|
||||
###############################################################################
|
||||
#*.cs diff=csharp
|
||||
|
||||
###############################################################################
|
||||
# Set the merge driver for project and solution files
|
||||
#
|
||||
# Merging from the command prompt will add diff markers to the files if there
|
||||
# are conflicts (Merging from VS is not affected by the settings below, in VS
|
||||
# the diff markers are never inserted). Diff markers may cause the following
|
||||
# file extensions to fail to load in VS. An alternative would be to treat
|
||||
# these files as binary and thus will always conflict and require user
|
||||
# intervention with every merge. To do so, just uncomment the entries below
|
||||
###############################################################################
|
||||
#*.sln merge=binary
|
||||
#*.csproj merge=binary
|
||||
#*.vbproj merge=binary
|
||||
#*.vcxproj merge=binary
|
||||
#*.vcproj merge=binary
|
||||
#*.dbproj merge=binary
|
||||
#*.fsproj merge=binary
|
||||
#*.lsproj merge=binary
|
||||
#*.wixproj merge=binary
|
||||
#*.modelproj merge=binary
|
||||
#*.sqlproj merge=binary
|
||||
#*.wwaproj merge=binary
|
||||
|
||||
###############################################################################
|
||||
# behavior for image files
|
||||
#
|
||||
# image files are treated as binary by default.
|
||||
###############################################################################
|
||||
#*.jpg binary
|
||||
#*.png binary
|
||||
#*.gif binary
|
||||
|
||||
###############################################################################
|
||||
# diff behavior for common document formats
|
||||
#
|
||||
# Convert binary document formats to text before diffing them. This feature
|
||||
# is only available from the command line. Turn it on by uncommenting the
|
||||
# entries below.
|
||||
###############################################################################
|
||||
#*.doc diff=astextplain
|
||||
#*.DOC diff=astextplain
|
||||
#*.docx diff=astextplain
|
||||
#*.DOCX diff=astextplain
|
||||
#*.dot diff=astextplain
|
||||
#*.DOT diff=astextplain
|
||||
#*.pdf diff=astextplain
|
||||
#*.PDF diff=astextplain
|
||||
#*.rtf diff=astextplain
|
||||
#*.RTF diff=astextplain
|
@ -0,0 +1,253 @@
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
|
||||
# Local build files
|
||||
*c.cmd
|
||||
*a.exe
|
||||
|
||||
# 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/
|
||||
[Xx]64/
|
||||
[Xx]86/
|
||||
[Bb]uild/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
|
||||
# Visual Studio 2015 cache/options directory
|
||||
.vs/
|
||||
|
||||
# Visual Studio Code
|
||||
.vscode/
|
||||
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# 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
|
||||
|
||||
# DNX
|
||||
project.lock.json
|
||||
artifacts/
|
||||
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_i.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# JustCode is a .NET coding add-in
|
||||
.JustCode
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
|
||||
# TODO: Un-comment the next line if you do not want to checkin
|
||||
# your web deploy settings because they may include unencrypted
|
||||
# passwords
|
||||
#*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# 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 ignoreable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Microsoft Azure ApplicationInsights config file
|
||||
ApplicationInsights.config
|
||||
|
||||
# Windows Store app package directory
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
[Ss]tyle[Cc]op.*
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
node_modules/
|
||||
orleans.codegen.cs
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# LightSwitch generated files
|
||||
GeneratedArtifacts/
|
||||
ModelManifest.xml
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
@ -0,0 +1,72 @@
|
||||
language: cpp
|
||||
|
||||
# ubuntu 14.04 version
|
||||
sudo: required
|
||||
dist: trusty
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
addons:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['g++-5']
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
|
||||
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
addons:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['g++-6']
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"
|
||||
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
addons:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['g++-7']
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
|
||||
|
||||
- os: osx
|
||||
osx_image: xcode5
|
||||
env:
|
||||
- MATRIX_EVAL="CC=clang && CXX=clang++"
|
||||
|
||||
- os: osx
|
||||
osx_image: xcode6
|
||||
env:
|
||||
- MATRIX_EVAL="CC=clang && CXX=clang++"
|
||||
|
||||
- os: osx
|
||||
osx_image: xcode7
|
||||
env:
|
||||
- MATRIX_EVAL="CC=clang && CXX=clang++"
|
||||
|
||||
- os: osx
|
||||
osx_image: xcode8
|
||||
env:
|
||||
- MATRIX_EVAL="CC=clang && CXX=clang++"
|
||||
|
||||
|
||||
before_script:
|
||||
- eval "${MATRIX_EVAL}"
|
||||
- $CXX --version
|
||||
|
||||
script:
|
||||
- mkdir build && cd ./build
|
||||
- cmake ..
|
||||
- make
|
||||
- cd ../bin && ./stltest
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
notifications:
|
||||
email: false
|
@ -0,0 +1,35 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
project(MyTinySTL)
|
||||
|
||||
# version
|
||||
set(MyTinySTL_VERSION_MAJOR 2)
|
||||
set(MyTinySTL_VERSION_MINOR 0)
|
||||
set(MyTinySTL_VERSION_PATCH 0)
|
||||
set(MyTinySTL_VERSION "${MyTinySTL_VERSION_MAJOR}.${MyTinySTL_VERSION_MINOR}.${MyTinySTL_VERSION_PATCH}")
|
||||
message(STATUS "The version of this project is: ${MyTinySTL_VERSION}")
|
||||
|
||||
# build type
|
||||
set(CMAKE_BUILD_TYPE release)
|
||||
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -Wall -Wextra -Wno-sign-compare -Wno-unused-but-set-variable -Wno-array-bounds")
|
||||
# set(EXTRA_CXX_FLAGS -Weffc++ -Wswitch-default -Wfloat-equal -Wconversion -Wsign-conversion)
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0.0")
|
||||
message(FATAL_ERROR "required GCC 5.0 or later")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
endif()
|
||||
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -Wall -Wextra -Wno-sign-compare")
|
||||
# set(EXTRA_CXX_FLAGS -Weffc++ -Wswitch-default -Wfloat-equal -Wconversion -Wimplicit-fallthrough)
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.5.0")
|
||||
message(FATAL_ERROR "required Clang 3.5 or later")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message(STATUS "The cmake_cxx_flags is: ${CMAKE_CXX_FLAGS}")
|
||||
|
||||
add_subdirectory(${PROJECT_SOURCE_DIR}/Test)
|
@ -0,0 +1,11 @@
|
||||
Copyright (c) 2016-2017 Alinshans. All rights reserved.
|
||||
|
||||
First published on github, see https://github.com/Alinshans/MyTinySTL
|
||||
|
||||
The MyTinySTL source code is licensed under the 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.
|
@ -0,0 +1,28 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyTinySTL", "MyTinySTL_VS2015.vcxproj", "{E88807F6-B07C-4371-BD38-FB1569F894E4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{E88807F6-B07C-4371-BD38-FB1569F894E4}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E88807F6-B07C-4371-BD38-FB1569F894E4}.Debug|x64.Build.0 = Debug|x64
|
||||
{E88807F6-B07C-4371-BD38-FB1569F894E4}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{E88807F6-B07C-4371-BD38-FB1569F894E4}.Debug|x86.Build.0 = Debug|Win32
|
||||
{E88807F6-B07C-4371-BD38-FB1569F894E4}.Release|x64.ActiveCfg = Release|x64
|
||||
{E88807F6-B07C-4371-BD38-FB1569F894E4}.Release|x64.Build.0 = Release|x64
|
||||
{E88807F6-B07C-4371-BD38-FB1569F894E4}.Release|x86.ActiveCfg = Release|Win32
|
||||
{E88807F6-B07C-4371-BD38-FB1569F894E4}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@ -0,0 +1,162 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="资源文件">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="include">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="source">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="test">
|
||||
<UniqueIdentifier>{ec314ff3-dcde-4cac-a63a-4f6827750d0a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="test\Lib">
|
||||
<UniqueIdentifier>{c6f24d77-e6f0-439e-954a-c0ca577689d5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\MyTinySTL\type_traits.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\MyTinySTL\construct.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\MyTinySTL\alloc.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\MyTinySTL\allocator.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\MyTinySTL\uninitialized.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\MyTinySTL\iterator.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\MyTinySTL\numeric.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\MyTinySTL\algobase.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\MyTinySTL\heap_algo.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\MyTinySTL\set_algo.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\MyTinySTL\algo.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\MyTinySTL\algorithm.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\MyTinySTL\vector.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\MyTinySTL\memory.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\MyTinySTL\list.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\MyTinySTL\deque.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\MyTinySTL\stack.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\MyTinySTL\queue.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\MyTinySTL\functional.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\MyTinySTL\rb_tree.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\MyTinySTL\set.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\MyTinySTL\map.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\MyTinySTL\hashtable.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\MyTinySTL\basic_string.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\MyTinySTL\unordered_set.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\MyTinySTL\unordered_map.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Test\algorithm_performance_test.h">
|
||||
<Filter>test</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Test\algorithm_test.h">
|
||||
<Filter>test</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Test\deque_test.h">
|
||||
<Filter>test</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Test\list_test.h">
|
||||
<Filter>test</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Test\map_test.h">
|
||||
<Filter>test</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Test\queue_test.h">
|
||||
<Filter>test</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Test\set_test.h">
|
||||
<Filter>test</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Test\stack_test.h">
|
||||
<Filter>test</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Test\string_test.h">
|
||||
<Filter>test</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Test\test.h">
|
||||
<Filter>test</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Test\unordered_map_test.h">
|
||||
<Filter>test</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Test\unordered_set_test.h">
|
||||
<Filter>test</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Test\vector_test.h">
|
||||
<Filter>test</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Test\Lib\redbud\platform.h">
|
||||
<Filter>test\Lib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Test\Lib\redbud\io\color.h">
|
||||
<Filter>test\Lib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\MyTinySTL\astring.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\MyTinySTL\util.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\MyTinySTL\exceptdef.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Test\test.cpp">
|
||||
<Filter>test</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,26 @@
|
||||
#ifndef MYTINYSTL_EXCEPTDEF_H_
|
||||
#define MYTINYSTL_EXCEPTDEF_H_
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
#include <cassert>
|
||||
|
||||
namespace mystl
|
||||
{
|
||||
|
||||
#define MYSTL_DEBUG(expr) \
|
||||
assert(expr)
|
||||
|
||||
#define THROW_LENGTH_ERROR_IF(expr, what) \
|
||||
if ((expr)) throw std::length_error(what)
|
||||
|
||||
#define THROW_OUT_OF_RANGE_IF(expr, what) \
|
||||
if ((expr)) throw std::out_of_range(what)
|
||||
|
||||
#define THROW_RUNTIME_ERROR_IF(expr, what) \
|
||||
if ((expr)) throw std::runtime_error(what)
|
||||
|
||||
} // namepsace mystl
|
||||
|
||||
#endif // !MYTINYSTL_EXCEPTDEF_H_
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,4 @@
|
||||
include_directories(${PROJECT_SOURCE_DIR}/MyTinySTL)
|
||||
set(APP_SRC test.cpp)
|
||||
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
|
||||
add_executable(stltest ${APP_SRC})
|
@ -0,0 +1,351 @@
|
||||
// ============================================================================
|
||||
// Copyright (c) 2017 Alinshans. All rights reserved.
|
||||
// Licensed under the MIT License. See LICENSE for details.
|
||||
//
|
||||
// Header File : redbud/io/color.h
|
||||
//
|
||||
// This file is used to control font format and color in the terminal, which
|
||||
// refers to a project on github, see https://github.com/agauniyal/rang .
|
||||
// ============================================================================
|
||||
|
||||
#ifndef ALINSHANS_REDBUD_IO_COLOR_H_
|
||||
#define ALINSHANS_REDBUD_IO_COLOR_H_
|
||||
|
||||
#include "../platform.h"
|
||||
|
||||
#if defined(REDBUD_LINUX) || defined(REDBUD_OSX)
|
||||
#include <unistd.h> // getenv
|
||||
#include <cstring> // strstr
|
||||
#elif defined(REDBUD_WIN)
|
||||
#include <Windows.h>
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
#include <type_traits>
|
||||
|
||||
namespace redbud
|
||||
{
|
||||
namespace io
|
||||
{
|
||||
|
||||
// ============================================================================
|
||||
// Enumerates the ANSI escape code corresponding to the font attributes.
|
||||
// See https://en.wikipedia.org/wiki/ANSI_escape_code for details.
|
||||
//
|
||||
// Example:
|
||||
// using namespace redbud::io;
|
||||
// std::cout << fg::red << "This text has a red foreground color\n";
|
||||
// std::cout << bg::green << "This text has a green background color\n"
|
||||
// ============================================================================
|
||||
|
||||
// Sets the text format, some of them is not widely supported.
|
||||
enum class format
|
||||
{
|
||||
reset = 0, // All attributes off.
|
||||
bold = 1, // Bold or increased intensity.
|
||||
faint = 2, // Faint (decreased intensity).
|
||||
italic = 3, // Italian font.
|
||||
underline = 4, // Underline.
|
||||
blinkslow = 5, // Blink slowly.
|
||||
blinkrapid = 6, // Blink quickly.
|
||||
inverse = 7, // Swap foreground and background.
|
||||
conceal = 8, // Hide the text.
|
||||
strikeline = 9 // Characters legible, but marked for deletion.
|
||||
};
|
||||
|
||||
// Sets the foreground color.
|
||||
enum class fg
|
||||
{
|
||||
black = 30,
|
||||
red = 31,
|
||||
green = 32,
|
||||
yellow = 33,
|
||||
blue = 34,
|
||||
purple = 35,
|
||||
cyan = 36,
|
||||
white = 37,
|
||||
reserve = 38,
|
||||
reset = 39
|
||||
};
|
||||
|
||||
// Sets the background color.
|
||||
enum class bg
|
||||
{
|
||||
black = 40,
|
||||
red = 41,
|
||||
green = 42,
|
||||
yellow = 43,
|
||||
blue = 44,
|
||||
purple = 45,
|
||||
cyan = 46,
|
||||
white = 47,
|
||||
reserve = 38,
|
||||
reset = 39
|
||||
};
|
||||
|
||||
// Sets the highlight foreground color.
|
||||
enum class hfg
|
||||
{
|
||||
black = 90,
|
||||
red = 91,
|
||||
green = 92,
|
||||
yellow = 93,
|
||||
blue = 94,
|
||||
purple = 95,
|
||||
cyan = 96,
|
||||
white = 97
|
||||
};
|
||||
|
||||
// Sets the highlight background color.
|
||||
enum class hbg
|
||||
{
|
||||
black = 100,
|
||||
red = 101,
|
||||
green = 102,
|
||||
yellow = 103,
|
||||
blue = 104,
|
||||
purple = 105,
|
||||
cyan = 106,
|
||||
white = 107
|
||||
};
|
||||
|
||||
// Sets the control state.
|
||||
enum class state
|
||||
{
|
||||
automatic = 0, // Automatic control.
|
||||
manual = 1 // Manual control.
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Details
|
||||
namespace details
|
||||
{
|
||||
|
||||
// Manages associated stream buffer.
|
||||
inline const std::streambuf*& get_coutbuf()
|
||||
{
|
||||
static const std::streambuf* pout = std::cout.rdbuf();
|
||||
return pout;
|
||||
}
|
||||
|
||||
inline const std::streambuf*& get_cerrbuf()
|
||||
{
|
||||
static const std::streambuf* perr = std::cerr.rdbuf();
|
||||
return perr;
|
||||
}
|
||||
|
||||
inline const std::streambuf*& get_clogbuf()
|
||||
{
|
||||
static const std::streambuf* plog = std::clog.rdbuf();
|
||||
return plog;
|
||||
}
|
||||
|
||||
// Gets an unique integer to use as index to iword()
|
||||
inline int get_iword()
|
||||
{
|
||||
static int i = std::ios_base::xalloc();
|
||||
return i;
|
||||
}
|
||||
|
||||
// Determines whether the terminal color of this system can be modified.
|
||||
inline bool is_modifiable()
|
||||
{
|
||||
#if defined(REDBUD_LINUX) || defined(REDBUD_OSX)
|
||||
static constexpr const char* terms[] = {
|
||||
"ansi", "color", "console", "cygwin", "gnome", "konsole", "kterm",
|
||||
"linux", "msys", "putty", "rxvt", "screen", "vt100", "xterm"
|
||||
};
|
||||
const char *penv = std::getenv("TERM");
|
||||
if (penv == nullptr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
bool result = false;
|
||||
for (const auto& t : terms)
|
||||
{
|
||||
if (std::strstr(penv, t) != nullptr)
|
||||
{
|
||||
result = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#elif defined(REDBUD_WIN)
|
||||
static constexpr bool result = true;
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
/// Determines whether the buffer stream reaches the end.
|
||||
inline bool is_terminal(const std::streambuf* buf)
|
||||
{
|
||||
if (buf == get_coutbuf())
|
||||
{
|
||||
#if defined(REDBUD_LINUX) || defined(REDBUD_OSX)
|
||||
return isatty(fileno(stdout)) ? true : false;
|
||||
#elif defined(REDBUD_WIN)
|
||||
return _isatty(_fileno(stdout)) ? true : false;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (buf == get_cerrbuf() || buf == get_clogbuf())
|
||||
{
|
||||
#if defined(REDBUD_LINUX) || defined(REDBUD_OSX)
|
||||
return isatty(fileno(stderr)) ? true : false;
|
||||
#elif defined(REDBUD_WIN)
|
||||
return _isatty(_fileno(stderr)) ? true : false;
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// For overloading standard output stream.
|
||||
template <typename T>
|
||||
using color_return_t = typename std::enable_if<
|
||||
std::is_same<T, redbud::io::format>::value ||
|
||||
std::is_same<T, redbud::io::fg>::value ||
|
||||
std::is_same<T, redbud::io::bg>::value ||
|
||||
std::is_same<T, redbud::io::hfg>::value ||
|
||||
std::is_same<T, redbud::io::hbg>::value,
|
||||
std::ostream&>::type;
|
||||
|
||||
template <typename T>
|
||||
using state_return_t = typename std::enable_if<
|
||||
std::is_same<T, redbud::io::state>::value,
|
||||
std::ostream&>::type;
|
||||
|
||||
// Sets the format and color of the text.
|
||||
#if defined(REDBUD_LINUX) || defined(REDBUD_OSX)
|
||||
template <typename T>
|
||||
inline color_return_t<T> set_color(std::ostream& os, const T& value)
|
||||
{
|
||||
return os << "\033[" << static_cast<int>(value) << "m";
|
||||
}
|
||||
|
||||
#elif defined(REDBUD_WIN)
|
||||
|
||||
static constexpr WORD default_state = (FOREGROUND_BLUE |
|
||||
FOREGROUND_GREEN |
|
||||
FOREGROUND_RED);
|
||||
|
||||
// Gets the corresponding RGB value on Windows.
|
||||
inline WORD get_rgb(WORD rgb)
|
||||
{
|
||||
static constexpr WORD cor[8] = { 0, 4, 2, 6, 1, 5, 3, 7 };
|
||||
return cor[rgb];
|
||||
}
|
||||
|
||||
// Sets font attributes on Windows.
|
||||
inline void set_attributes(redbud::io::fg color, WORD& state)
|
||||
{
|
||||
if (color == redbud::io::fg::reserve)
|
||||
{
|
||||
return;
|
||||
}
|
||||
state &= 0xFFF0;
|
||||
if (color == redbud::io::fg::reset)
|
||||
{
|
||||
state |= default_state;
|
||||
return;
|
||||
}
|
||||
state |= get_rgb(static_cast<WORD>(color) - 30);
|
||||
}
|
||||
|
||||
inline void set_attributes(redbud::io::bg color, WORD& state)
|
||||
{
|
||||
if (color == redbud::io::bg::reserve)
|
||||
{
|
||||
return;
|
||||
}
|
||||
state &= 0xFF0F;
|
||||
if (color == redbud::io::bg::reset)
|
||||
{
|
||||
return;
|
||||
}
|
||||
state |= get_rgb(static_cast<WORD>(color) - 40) << 4;
|
||||
}
|
||||
|
||||
inline void set_attributes(redbud::io::hfg color, WORD& state)
|
||||
{
|
||||
state &= 0xFFF0;
|
||||
state |= (static_cast<WORD>(0x8) |
|
||||
get_rgb(static_cast<WORD>(color) - 90));
|
||||
}
|
||||
|
||||
inline void set_attributes(redbud::io::hbg color, WORD& state)
|
||||
{
|
||||
state &= 0xFF0F;
|
||||
state |= (static_cast<WORD>(0x80) |
|
||||
get_rgb(static_cast<WORD>(color) - 100) << 4);
|
||||
}
|
||||
|
||||
inline void set_attributes(redbud::io::format format, WORD& state)
|
||||
{
|
||||
if (format == redbud::io::format::reset)
|
||||
{
|
||||
state = default_state;
|
||||
}
|
||||
}
|
||||
|
||||
inline WORD& current_state()
|
||||
{
|
||||
static WORD state = default_state;
|
||||
return state;
|
||||
}
|
||||
|
||||
inline HANDLE get_console_handle()
|
||||
{
|
||||
static HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
return h;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline color_return_t<T> set_color(std::ostream& os, const T& value)
|
||||
{
|
||||
HANDLE h = get_console_handle();
|
||||
if (h && is_terminal(os.rdbuf()))
|
||||
{
|
||||
set_attributes(value, current_state());
|
||||
SetConsoleTextAttribute(h, current_state());
|
||||
return os;
|
||||
}
|
||||
return os;
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace details
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Overloads standard output stream to control the color of text.
|
||||
|
||||
template <typename T>
|
||||
inline details::color_return_t<T>
|
||||
operator<<(std::ostream& os, const T& value)
|
||||
{
|
||||
return (os.iword(details::get_iword()) ||
|
||||
(details::is_modifiable() &&
|
||||
details::is_terminal(os.rdbuf())))
|
||||
? details::set_color(os, value)
|
||||
: os;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline details::state_return_t<T>
|
||||
operator<<(std::ostream& os, const T& value)
|
||||
{
|
||||
if (value == redbud::io::state::automatic)
|
||||
{
|
||||
os.iword(details::get_iword()) = 0;
|
||||
}
|
||||
else if (value == redbud::io::state::manual)
|
||||
{
|
||||
os.iword(details::get_iword()) = 1;
|
||||
}
|
||||
return os;
|
||||
}
|
||||
|
||||
} // namespace io
|
||||
} // namespace redbud
|
||||
#endif // !ALINSHANS_REDBUD_IO_COLOR_H_
|
@ -0,0 +1,108 @@
|
||||
// ============================================================================
|
||||
// Copyright (c) 2017 Alinshans. All rights reserved.
|
||||
// Licensed under the MIT License. See LICENSE for details.
|
||||
//
|
||||
// Header File : redbud/platform.h
|
||||
//
|
||||
// This file contains some preprocessing macros related to the platform.
|
||||
// ============================================================================
|
||||
|
||||
#ifndef ALINSHANS_REDBUD_PLATFORM_H_
|
||||
#define ALINSHANS_REDBUD_PLATFORM_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// os
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32) || defined(_WIN64)
|
||||
#define REDBUD_WIN 1
|
||||
#elif defined(__unix__) || defined(__unix) || defined(__linux__)
|
||||
#define REDBUD_LINUX 1
|
||||
#elif defined(__APPLE__) || defined(__MACH__)
|
||||
#define REDBUD_OSX 1
|
||||
#else
|
||||
#error "System that is not supported yet."
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// complier
|
||||
|
||||
#if defined(__clang__)
|
||||
#define REDBUD_CLANG __clang__
|
||||
#elif defined(__GNUC__)
|
||||
#define REDBUD_GNUC __GNUC__
|
||||
#elif defined(_MSC_VER)
|
||||
#define REDBUD_MSVC _MSC_VER
|
||||
#else
|
||||
#error "Complier that is not supported yet."
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// stringify
|
||||
|
||||
#define REDBUD_TO_STRING(x) #x
|
||||
#define REDBUD_STRING(x) REDBUD_TO_STRING(x)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// join
|
||||
|
||||
#define REDBUD_DO_JOIN(x ,y) x##y
|
||||
#define REDBUD_JOIN(x, y) REDBUD_DO_JOIN(x, y)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// version
|
||||
|
||||
#define REDBUD_MAJOR 1
|
||||
#define REDBUD_MINOR 0
|
||||
#define REDBUD_PATCH 0
|
||||
#define REDBUD_VERSION \
|
||||
REDBUD_STRING(REDBUD_MAJOR.REDBUD_MINOR.REDBUD_PATCH)
|
||||
|
||||
#define _VERSION_CODE(x,y,z) \
|
||||
(((x)*100000) + ((y)*100) + (z))
|
||||
|
||||
#define GNUC_VERSION \
|
||||
_VERSION_CODE(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)
|
||||
|
||||
#define CLANG_VERSION \
|
||||
_VERSION_CODE(__clang_major__, __clang_minor__, __clang_patchlevel__)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// redbud API
|
||||
|
||||
#ifndef _REDBUD_API
|
||||
#define _REDBUD_API ::redbud::
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// C++11 required
|
||||
|
||||
#ifndef REDBUD_HAS_CXX11
|
||||
#if defined(REDBUD_MSVC) && (REDBUD_MSVC >= 1900)
|
||||
#define REDBUD_HAS_CXX11 1
|
||||
#elif defined(REDBUD_GNUC) && (GNUC_VERSION >= _VERSION_CODE(4,8,0)) && \
|
||||
defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
#define REDBUD_HAS_CXX11 1
|
||||
#elif defined(REDBUD_CLANG) && (CLANG_VERSION >= _VERSION_CODE(3,3,0))
|
||||
#define REDBUD_HAS_CXX11 1
|
||||
#else
|
||||
#define REDBUD_HAS_CXX11 0
|
||||
#endif
|
||||
#endif // !REDBUD_HAS_CXX11
|
||||
|
||||
#if REDBUD_HAS_CXX11 == 0
|
||||
#error "C++11 required."
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Undefines macro min and max in MSVC.
|
||||
|
||||
namespace redbud
|
||||
{
|
||||
|
||||
#if REDBUD_MSVC
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif // !ALINSHANS_REDBUD_PLATFORM_H_
|
@ -0,0 +1,51 @@
|
||||
单元测试 (Unit test)
|
||||
=====
|
||||
## 测试环境 (Test environment)
|
||||
测试直接在 `Travis CI` 和 `AppVeyor` 上构建并运行,已在以下环境中做过测试:
|
||||
|
||||
Tests were built and run directly on `Tracis CI` and `AppVeyor` and had been tested in the following environments:
|
||||
|
||||
* linux, ubuntu 14.04, gcc5/6/7
|
||||
* osx, xcode5/6/7/8
|
||||
* windows, VS2015/VS2017, [x64|x86], [Release|Debug]
|
||||
|
||||
## 测试框架 (Test frame)
|
||||
在 [test.h](https://github.com/Alinshans/MyTinySTL/blob/master/Test/test.h) 中,用了两个类实现了一个简单的测试框架,并定义了大量宏来封装测试过程。</br>
|
||||
In this file [test.h](https://github.com/Alinshans/MyTinySTL/blob/master/Test/test.h), I used two class to implement a simple test framework, and defined a lot of macros to package testing process.
|
||||
|
||||
## 测试内容 (Test content)
|
||||
在 [test.h](https://github.com/Alinshans/MyTinySTL/blob/master/Test/test.h) 中定义了两个宏,`PERFORMANCE_TEST_ON` 和 `LARGER_TEST_DATA_ON`。`PERFORMANCE_TEST_ON` 代表开启性能测试,默认定义为 `1`。`LARGER_TEST_DATA_ON` 代表增大测试数据,默认定义为 `0`。**如果你想把 `LARGER_TEST_DATA_ON` 设置为 `1`,建议电脑配置为:处理器 i5 或以上,内存 8G 以上。**<br>
|
||||
In this file [test.h](https://github.com/Alinshans/MyTinySTL/blob/master/Test/test.h), I defined two marcos: `PERFORMANCE_TEST_ON` and `LARGER_TEST_DATA_ON`. `PERFORMANCE_TEST_ON` means to run performance test, the default is defined as `1`. `LARGER_TEST_DATA_ON` means to increase the test data, the default is defined as `0`. **If you want to set `LARGER_TEST_DATA_ON` to `1`, the proposed computer configuration is: CPU i5 or above, memory 8G or more.**
|
||||
|
||||
测试案例如下:<br>
|
||||
The test cases are as follows:
|
||||
|
||||
* [algorithm](https://github.com/Alinshans/MyTinySTL/blob/master/Test/algorithm_test.h) *(100%/100%)*
|
||||
* [algorithm_performance](https://github.com/Alinshans/MyTinySTL/blob/master/Test/algorithm_performance_test.h) *(100%/100%)*
|
||||
* [deque](https://github.com/Alinshans/MyTinySTL/blob/master/Test/deque_test.h) *(100%/100%)*
|
||||
* [list](https://github.com/Alinshans/MyTinySTL/blob/master/Test/list_test.h) *(100%/100%)*
|
||||
* [map](https://github.com/Alinshans/MyTinySTL/blob/master/Test/map_test.h) *(100%/100%)*
|
||||
* map
|
||||
* multimap
|
||||
* [queue](https://github.com/Alinshans/MyTinySTL/blob/master/Test/queue_test.h) *(100%/100%)*
|
||||
* queue
|
||||
* priority_queue
|
||||
* [set](https://github.com/Alinshans/MyTinySTL/blob/master/Test/set_test.h) *(100%/100%)*
|
||||
* set
|
||||
* multiset
|
||||
* [stack](https://github.com/Alinshans/MyTinySTL/blob/master/Test/stack_test.h) *(100%/100%)*
|
||||
* [string_test](https://github.com/Alinshans/MyTinySTL/blob/master/Test/string_test.h) *(100%/100%)*
|
||||
* [unordered_map](https://github.com/Alinshans/MyTinySTL/blob/master/Test/unordered_map_test.h) *(100%/100%)*
|
||||
* unordered_map
|
||||
* unordered_multimap
|
||||
* [unordered_set](https://github.com/Alinshans/MyTinySTL/blob/master/Test/unordered_set_test.h) *(100%/100%)*
|
||||
* unordered_set
|
||||
* unordered_multiset
|
||||
* [vector](https://github.com/Alinshans/MyTinySTL/blob/master/Test/vector_test.h) *(100%/100%)*
|
||||
|
||||
|
||||
## 测试结果 (Test result)
|
||||
见 [Travis CI](https://travis-ci.org/Alinshans/MyTinySTL) 和 [AppVeyor](https://ci.appveyor.com/project/Alinshans/mytinystl)。
|
||||
|
||||
See [Travis CI](https://travis-ci.org/Alinshans/MyTinySTL) and [AppVeyor](https://ci.appveyor.com/project/Alinshans/mytinystl).
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,21 @@
|
||||
version: 2.0.1{build}
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
image:
|
||||
- Visual Studio 2015
|
||||
- Visual Studio 2017
|
||||
|
||||
configuration:
|
||||
- Release
|
||||
|
||||
build:
|
||||
parallel: true
|
||||
project: MSVC\MyTinySTL_VS2015.sln
|
||||
|
||||
test_script:
|
||||
- cmd: cd .\MSVC\x64\Release\
|
||||
- cmd: MyTinySTL.exe
|
||||
|
Loading…
Reference in new issue