--- Begin Message ---
I have this code so solve a challenge of Advent Of Code :process: anArray | op | ram := (anArray splitOn: ',') collect: [ :ea | ea asInteger ]. in := ReadStream on: ram. [ (op := in next) = 99 ] whileFalse: [ self processOpcode: op ]. ^ self at: 0
that works fine for the given testsbut on the real data I have to change 2 numbersso I can do :process: anArray | op | ram := (anArray splitOn: ',') collect: [ :ea | ea asInteger ]. self put: 2 at: 3. in := ReadStream on: ram. [ (op := in next) = 99 ] whileFalse: [ self processOpcode: op ]. ^ self at: 0
but that breaks all the testsis there a way I can make it work for the tests and for the real data without breaking anything ?
so to be clear. In the test are data given which not has to be changed. As soon as you have to solve the real problem , some data needs to be changed.
Roelof
--- End Message ---
[Pharo-users] how to change data on real data but not on test data
Roelof Wobben via Pharo-users Sat, 28 Dec 2019 09:37:55 -0800
- [Pharo-users] how to change data on real dat... Roelof Wobben via Pharo-users
- Re: [Pharo-users] how to change data on... Sean P. DeNigris
- Re: [Pharo-users] how to change dat... Roelof Wobben via Pharo-users