Daigo Hamura's Weblog

コンパイラのテスト

殺人的な忙しい日々がやっと終わりやっとアップデートできました。最後のポストからだいぶたったのですが、今日は、どのようにC#のコンパイラはテストするのか?について書いてみたいと思います。私は、Whidbeyでは主にAnonymous Methods, Iterators, C# Expression Evaluator (Debugger)のテストを担当しています。Genericはもう一人の同僚の担当ですが、基本的にGenericはどこでも使えますのではまったく使わないという訳には行きません。 実際のテストとなると、どのコンパイラのテストも似たようなものだと思いますが、言語仕様の一行、一文字に対してテストを書いていきます。たとえば、C# 言語の仕様 2.4.4.4 文字リテラルをテストするとなると
string s1=""; //empty
string s2="\0"; // escape chars
string s3=" "; // space
と書いていきます。Unicode,エスケープ文字などはもちろん1MB以上の文字列など特殊なケース(仕様書で特に触れられていない)についてもテストしていきます。このようなテストは意外と時間はかかりますが書いてしまえばそれで終わりです。書いたテストは毎日かってに走ってますので、ちゃんとパスしているか確認すれば済みます。テストを走らせているシステムについては、また別の機会に書いてみたいと思います。しかし、Anonymous Methods, Iterators、Genericsなどの新しいのになるとテストを書くのも一苦労です。と言うのも言語の仕様が日々変更になるからです。仕様書と言ってもメモ程度のものがあればいい方、でたまにはこう動くはずだと勝手に仕様を決めながらテストを書いていきます。書いたあとのメインテナンス、特に一度テストを書き終わってからの変更は大変です。Find&Replaceをする訳にもいきませんので一つ一つ変更を確認しながらテストを修正していきます。このようにして何とか終わらせて、いざRTMとなっても、バグがありませんようにと願う日々がつつきます。
 

Published Sunday, February 22, 2004 9:38 PM by daigoh

Comments

 

Scott said:

Daigoh,

First, there will always be ignorant people. Please do not let them deter you.

Second, we will soon have better support for grouping blogs by different languages. Hopefully this will make it a bit easier to extent the community further.

-Scott
February 23, 2004 6:58 AM
 

河端善博の .TEXT でウェブログ said:

C# ??????????? Daigo Hamura ??????
February 27, 2004 12:44 AM
 

Yoshihiro Kawabata said:

I provide blog portal by .TEXT for SQL Server users group 'PASSJ'.
and, I'm MVP for SQL Server.
February 26, 2004 9:47 PM
 

中村晃一 said:

It' OK to send Japanese Character through the Post form in HTML View, but we can't send them from feedback form now.
February 27, 2004 12:47 AM
 

Shinichi Haramizu said:

日本語で投稿をするときは、一度 FrontPage でエンコードをしたデータを書くといいようです。
February 27, 2004 12:56 AM
 

Kazuhiko Kikuchi said:

LeighSword,
'you may not look'
Yes, not trying, can't get anything.

I trying translate blog "Apartment and Threading in CLR".
original http://blogs.msdn.com/cbrumme/archive/2004/02/02/66219.aspx
translating work on
http://wiki.users.gr.jp/default.aspx/dotNet.cbrumme_ApartAndPumpInCLR

try to see. I'm trying everyday.

cross language communication has many of problems.

.Text (and every blog applications) has a some problem on cross language communication.

1. Trackback standerd not defined encoding.
Trackback text is easyly crash.

2. needs Language filterring for single Language persons.
(or machine translation?)

3. HTML encoding has a single encoding for file
I write Japanese, someone write Chinese,
any more...
Unicode encoding avoid this problem.
Everyone set encoding your page to Unicode(utf-8) now!

and anymore problems.

I'm MVP for .NET Framework.
my native language is Japanese.
February 27, 2004 3:51 AM
 

Orbium said:

?????????blog??? [CUTTING EDGE] ?????????. ?????????????? [HK-DMZ PLUS.COM] ??????? ??????????! ?????????????????! [Internet Journey] ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????PC??????????????. ??????????????! ????????????????????????????? [??????] ((((;???)))) ?????????????. WinXPProfessional?Home Edition??? [BRAINSTORM] ?????? ?????????? ???? ??????????????????????????????????????????? ????? ???????? NTFS ???? ???????????????????????????? ??? ?????????????? ?????? ???????NTFS??????????? ???,Home Edition?9x??????.
February 27, 2004 10:26 AM
 

YamaKen said:

As for L2 speakers or those who have learned English as a Second Language (ESL).

As you have commented above, there are many of countries in which English is adopted in a default curricuram so I feel it is natural for you to assume people from those areas knows English well. But the reality is, not so many of people in those areas can understand English, I mean read, write, listening, and speaking. So I am afraid it is risky to include the figures and numbers of people who have learned English as one of languages not as a mother tongue.

You know, however teachers teach well you may never learn things if you are not in need or do not have an interest. I think it is also true for native English speakers when they learn second or third languages. That is why we techie people in this industry in other areas have troubles in general concerning English.

This time this is inverted and you English speakers who do not know Japanese are exposed in the similar situation, I assume.
February 28, 2004 2:43 AM
 

渋木宏明(ひどり) blog said:

?????????
February 28, 2004 7:43 AM
 

Anonymous Crowd said:

LeighSword, Nice suggestion.

I saw it.
But, in this case, We can not understand the language(Japanese).
'very not politeness' for you?
February 29, 2004 7:57 PM
 

システム管理な雑記 said:

[??] ?????????????????????????????
March 2, 2004 2:02 PM
 

システム管理な雑記 said:

[??] ?????????????????????????????
March 2, 2004 2:25 PM
 

渋木宏明(ひどり) blog said:

?????????
March 19, 2004 7:18 PM
Anonymous comments are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker