Thanks Charlie. It is good to know that it does not likely
to be much more tasks to do for upgrading. On the other hand
I was under the impression that those obsoleted ones lived in 2.5 -
the conversion work is likely needed more.


BTW for those who join the upgrading, Zoltan has a script
of easy lines that would do large parts of the work. (attached)

Before posting changes, please make sure that

- there is no tests lost in transition.
- no regression is brought.

Some addendum: since reviewing the changes may still become massive
(Miguel did not want to spend our resources too much, and it is
pretty much understandable) I might take a while to do it, or at
worst have to discard the effort (in case changes look too significant
to review history). Sorry if in such case. I hope it goes well.

Atsushi Eno


Charlie Poole wrote:
Hi,

What you described below, plus the later comment about
adding TestFixture and test, should work OK. If there
are other types of asserts, you'll need to translate
them. I'm happy to take any questions (list or direct
email) of the nature "What's the best way ..."

Also, even though I called 2.4.8 the last 2.4 release,
I'd be glad to to a 2.4.9 for Mono if there should be
any problems that are easy to fix.

Charlie
PS: If you find (using NUnit 2.4.x) that anything is marked Obsolete, you can pretty much count that it's already gone in 2.5.


git checkout $1
dos2unix $1
sed -e 's/ : Assertion//g' < $1 > 2 && mv 2 $1
sed -e 's/AssertEquals (\("[^"]*"\), \(.*\)/Assert.AreEqual (\2, \1);/g' < $1 | 
sed -e 's/);,/,/g' | sed -e 's/); ,/ ,/g' > 2 && mv 2 $1
sed -e 's/AssertEquals(\("[^"]*"\), \(.*\)/Assert.AreEqual(\2, \1);/g' < $1 | 
sed -e 's/);,/,/g' | sed -e 's/); ,/ ,/g' > 2 && mv 2 $1
sed -e 's/Assert (\("[^"]*"\), \(.*\)/Assert.IsTrue (\2, \1);/g' < $1 | sed -e 
's/);,/,/g' | sed -e 's/); ,/ ,/g' > 2 && mv 2 $1
sed -e 's/Assert(\("[^"]*"\), \(.*\)/Assert.IsTrue(\2, \1);/g' < $1 | sed -e 
's/);,/,/g' | sed -e 's/); ,/ ,/g' > 2 && mv 2 $1
sed -e 's/AssertNull (\("[^"]*"\), \(.*\)/Assert.IsNull (\2, \1);/g' < $1 | sed 
-e 's/);,/,/g' | sed -e 's/); ,/ ,/g' > 2 && mv 2 $1
sed -e 's/AssertNotNull (\("[^"]*"\), \(.*\)/Assert.IsNotNull (\2, \1);/g' < $1 
| sed -e 's/);,/,/g' | sed -e 's/); ,/ ,/g' > 2 && mv 2 $1
sed -e 's/Fail (/Assert.Fail (/g' < $1 > 2 && mv 2 $1
sed -e 's/Fail(/Assert.Fail(/g' < $1 > 2 && mv 2 $1
sed -e 's/Assert (\([^"]\)/Assert.IsTrue (\1/g' < $1 > 2 && mv 2 $1


_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to