[openbeostranslationkit] Re: BTranslationRoster woes

Hey, I just thought of something that might work better for the
MakeConfigurationView testing.

I bet you could write code to cycle through all of the Translators and
call MakeConfigurationView for each one of them, then, flatten the view
and write it to a file.  You can do this for Be's implementation, then our
implementation, then make certain that the files are exactly the same or
that they have the same data in a different order.

On Tue, 2 Apr 2002, Brian Matzon wrote:

|From: "Mike Wilber" <wilber@xxxxxxxxxxxxxxxx>
|> Maybe they mean may, as in, never.
|Hmm quite possible, but that would be odd...
|
|> |2)
|> I believe that the BMessage constructor and the Instantiate function are
|> for two separate things. It seems strange to me that they would have two
|> different functions for doing the same thing. I believe the Instantiate
|> function is for creating BTranslatorRosters that were archived with the
|> Archive member function, and the BMessage constructor works as you've used
|> it.  I would try using the Archive member function with a working
|> BTranslatorRoster, then try to create a new BTranslatorRoster using
|> Instantiate with the BMessage that the Archive member function created.
|Yes I would think so! - I am quite certain that I did test it using the
|archived
|global TranslatorRoster (can't remeber if it worked though, will have to
|look at that when I get home from work).
|Being a deriviative of BArchivable, I would think that Instantiate should
|indeed be
|used in conjunction with Archive, however the docs state otherwise, since it
|says that it uses the BMessage type constructor. *ponder*
|
|> I would imagine that you would have to create a GUI app, passing the BView
|> that you get from MakeConfigurationView to a BWindow. You could probably
|> start with the HelloWord example and modify it a bit.
|yes, it would be simple to create a test gui application, however this
|defeats
|the purpose of unit tests, since they're just run - nobody is looking at
|them...
|How do I actually test that MakeConfigurationView works?
|I have thought about creating a small app that creates a BView, which is
|then
|passed to MakeConfigurationView. Now if MakeConfigurationView actually
|works it would fiddle with the BRect supplied to tell size, thus
|MakeConfigurationView has become measurable.
|
|/Brian Matzon
|
|


Other related posts: