Changeset 821 in dev


Ignore:
Timestamp:
Aug 7, 2011, 11:13:15 PM (13 years ago)
Author:
イグトランス (egtra)
Message:

単体テスト周りの修正

Location:
branches/egtra/ab5.0/abdev
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • branches/egtra/ab5.0/abdev/BasicCompiler_Common/StrOperation.cpp

    r820 r821  
    11#include "stdafx.h"
     2#include <abdev/ab_common/include/ab_common.h>
     3#include "StrOperation.h"
     4#include "common.h"
    25
    36void KillSpaces(char const *str1,char *str2){
  • branches/egtra/ab5.0/abdev/BasicCompiler_Common/StrOperation.h

    r603 r821  
     1#pragma once
    12
    23enum ReferenceKind
  • branches/egtra/ab5.0/abdev/ab-test/Type.cpp

    r820 r821  
    2222    Type::StringToBasicType("Long", basicType);
    2323    BOOST_CHECK_EQUAL(basicType, DEF_LONG);
     24
     25    BOOST_CHECK_EQUAL(Type::GetBasicTypeFromSimpleName("a%"), DEF_INTEGER);
    2426}
  • branches/egtra/ab5.0/abdev/ab-test/ab-test.cpp

    r818 r821  
    9494    ::GetModuleFileName(nullptr, moduleName, MAX_PATH);
    9595
    96     auto systemDir = fs::path(moduleName).parent_path().parent_path() / L"build/release/system";
     96    auto systemDir = fs::path(moduleName).parent_path().parent_path().parent_path() / L"build/release/system";
    9797
    9898    UniqueHModule hmodRes(::LoadLibraryExW((systemDir / name).wstring().c_str(), nullptr, LOAD_LIBRARY_AS_DATAFILE));
  • branches/egtra/ab5.0/abdev/ab-test/stdafx.h

    r818 r821  
    44
    55#define BOOST_FILESYSTEM_VERSION 3
    6 #define BOOST_FILESYSTEM_NO_DEPRECATED
    76
    87#include <memory>
  • branches/egtra/ab5.0/abdev/ab_common/ab_common.vcxproj

    r820 r821  
    177177    </ClCompile>
    178178    <ClCompile Include="src\Lexical\Source.cpp" />
    179     <ClCompile Include="src\Lexical\TypeDef.cpp" />
    180179    <ClCompile Include="src\Lexical\Variable.cpp" />
    181180    <ClCompile Include="src\ResourceManager\ResourceManager.cpp" />
  • branches/egtra/ab5.0/abdev/ab_common/ab_common.vcxproj.filters

    r820 r821  
    5353    </ClCompile>
    5454    <ClCompile Include="src\Lexical\Source.cpp">
    55       <Filter>Source Files\Lexical</Filter>
    56     </ClCompile>
    57     <ClCompile Include="src\Lexical\TypeDef.cpp">
    5855      <Filter>Source Files\Lexical</Filter>
    5956    </ClCompile>
  • branches/egtra/ab5.0/abdev/ab_common/include/BasicFixed.h

    r601 r821  
    129129
    130130//オブジェクト指向エスケープシーケンス
    131 #define ESC_CLASS           (char)0xA0
    132 #define ESC_ENDCLASS        (char)0xA1
    133 #define ESC_ABSTRACT        (char)0xA2
    134 #define ESC_VIRTUAL         (char)0xA3
    135 #define ESC_OVERRIDE        (char)0xA4
    136 #define ESC_INHERITS        (char)0xA5
    137 #define ESC_ENUM            (char)0xA6
    138 #define ESC_ENDENUM         (char)0xA7
    139 #define ESC_NEW             (char)0xA8
    140 #define ESC_INTERFACE       (char)0xA9
    141 #define ESC_ENDINTERFACE    (char)0xAA
    142 #define ESC_DELEGATE        (char)0xAB
    143 #define ESC_IMPLEMENTS      (char)0xAC
    144 #define ESC_SYSTEM_STATIC_NEW   (char)0xAD
     131#define ESC_CLASS           '\xA0'
     132#define ESC_ENDCLASS        '\xA1'
     133#define ESC_ABSTRACT        '\xA2'
     134#define ESC_VIRTUAL         '\xA3'
     135#define ESC_OVERRIDE        '\xA4'
     136#define ESC_INHERITS        '\xA5'
     137#define ESC_ENUM            '\xA6'
     138#define ESC_ENDENUM         '\xA7'
     139#define ESC_NEW             '\xA8'
     140#define ESC_INTERFACE       '\xA9'
     141#define ESC_ENDINTERFACE    '\xAA'
     142#define ESC_DELEGATE        '\xAB'
     143#define ESC_IMPLEMENTS      '\xAC'
     144#define ESC_SYSTEM_STATIC_NEW   '\xAD'
  • branches/egtra/ab5.0/abdev/ab_common/include/Lexical/Symbol.h

    r810 r821  
    3838
    3939public:
    40     Symbol( const NamespaceScopes &namespaceScopes, const std::string &name )
    41         : namespaceScopes( namespaceScopes )
    42         , name( name )
     40    Symbol(NamespaceScopes namespaceScopes, std::string name)
     41        : namespaceScopes(std::move(namespaceScopes))
     42        , name(std::move(name))
    4343    {
    4444    }
    45     Symbol( const Symbol &symbol )
    46         : namespaceScopes( symbol.namespaceScopes )
    47         , name( symbol.name )
     45    Symbol(const Symbol &symbol)
     46        : namespaceScopes(symbol.namespaceScopes)
     47        , name(symbol.name)
    4848    {
    4949    }
  • branches/egtra/ab5.0/abdev/ab_common/include/libs.h

    r756 r821  
    1111#define lstrcmpiA _stricmp
    1212
     13#if 0
    1314extern "C"
    1415{
     
    2324#define malloc dlmalloc
    2425#define realloc dlrealloc
     26#endif
  • branches/egtra/ab5.0/abdev/ab_common/src/Lexical/Type.cpp

    r820 r821  
    542542
    543543int Type::GetBasicTypeFromSimpleName( const char *variable ){
    544     extern char DefIntVari[26],DefSngVari[26],DefStrVari[26],divNum,dsvNum,dStrvNum;
     544    assert(variable != nullptr);
     545    auto length = std::strlen(variable);
     546    assert(length > 0);
     547
    545548    int i;
    546549    char name[VN_SIZE];
    547550
    548551    //構造体メンバの場合を考慮
    549     for(i=lstrlen(variable);i>0;i--){
     552    for(i=length;i>0;i--){
    550553        if(variable[i]=='.'){
    551554            i++;
  • branches/egtra/ab5.0/abdev/ab_common/src/Lexical/TypeDef.cpp

    r750 r821  
    11#include "stdafx.h"
     2#include <jenga/include/jenga.h>
     3#include <abdev/ab_common/include/ab_common.h>
    24
    35TypeDef::TypeDef( const Symbol &symbol, const std::string &baseName, const Type &baseType )
  • branches/egtra/ab5.0/abdev/compiler-impl/compiler-impl.vcxproj

    r820 r821  
    136136    <ClCompile Include="..\ab_common\src\Lexical\Template.cpp" />
    137137    <ClCompile Include="..\ab_common\src\Lexical\Type.cpp" />
     138    <ClCompile Include="..\ab_common\src\Lexical\TypeDef.cpp" />
    138139    <ClCompile Include="..\BasicCompiler_Common\src\LexicalAnalyzer_TypeDef.cpp" />
     140    <ClCompile Include="..\BasicCompiler_Common\StrOperation.cpp" />
    139141    <ClCompile Include="stdafx.cpp">
    140142      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
  • branches/egtra/ab5.0/abdev/compiler-impl/compiler-impl.vcxproj.filters

    r820 r821  
    7272      <Filter>ab-common\Lexical</Filter>
    7373    </ClCompile>
     74    <ClCompile Include="..\BasicCompiler_Common\StrOperation.cpp">
     75      <Filter>Source Files</Filter>
     76    </ClCompile>
     77    <ClCompile Include="..\ab_common\src\Lexical\TypeDef.cpp">
     78      <Filter>ab-common\Lexical</Filter>
     79    </ClCompile>
    7480  </ItemGroup>
    7581</Project>
  • branches/egtra/ab5.0/abdev/compiler.vcxproj

    r812 r821  
    315315      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
    316316    </ClCompile>
    317     <ClCompile Include="BasicCompiler_Common\StrOperation.cpp">
    318       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
    319       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
    320       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
    321       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
    322     </ClCompile>
    323317    <ClCompile Include="BasicCompiler_Common\CommandFormat.cpp">
    324318      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
  • branches/egtra/ab5.0/abdev/compiler.vcxproj.filters

    r812 r821  
    152152    </ClCompile>
    153153    <ClCompile Include="BasicCompiler_Common\RSrcSection.cpp">
    154       <Filter>Source Files\32及び64共通</Filter>
    155     </ClCompile>
    156     <ClCompile Include="BasicCompiler_Common\StrOperation.cpp">
    157154      <Filter>Source Files\32及び64共通</Filter>
    158155    </ClCompile>
Note: See TracChangeset for help on using the changeset viewer.