Mercurial > hg > svcore
comparison data/model/test/TestSparseModels.h @ 1651:7a56bb85030f single-point
Introduce deferred notifier, + start converting sparse time-value model (perhaps we should rename it too)
author | Chris Cannam |
---|---|
date | Mon, 18 Mar 2019 14:17:20 +0000 |
parents | 513192aa9b03 |
children | 5b7b01da430a |
comparison
equal
deleted
inserted
replaced
1650:bbfb5a1e4b84 | 1651:7a56bb85030f |
---|---|
203 m.add(p3); | 203 m.add(p3); |
204 QString xml; | 204 QString xml; |
205 QTextStream str(&xml, QIODevice::WriteOnly); | 205 QTextStream str(&xml, QIODevice::WriteOnly); |
206 m.toXml(str); | 206 m.toXml(str); |
207 str.flush(); | 207 str.flush(); |
208 | |
209 //!!! This is not guaranteed - object export ids are in order | |
210 //!!! of model pointer value, which is not trustworthy - | |
211 //!!! replace them with something else | |
212 | |
208 QString expected = | 213 QString expected = |
209 "<model id='3' name='' sampleRate='100' start='20' end='80' type='sparse' dimensions='3' resolution='10' notifyOnAdd='false' dataset='2' subtype='note' valueQuantization='0' minimum='123.4' maximum='126.3' units='Hz' />\n" | 214 "<model id='3' name='' sampleRate='100' start='20' end='80' type='sparse' dimensions='3' resolution='10' notifyOnAdd='true' dataset='2' subtype='note' valueQuantization='0' minimum='123.4' maximum='126.3' units='Hz' />\n" |
210 "<dataset id='2' dimensions='3'>\n" | 215 "<dataset id='2' dimensions='3'>\n" |
211 " <point frame='20' value='124.3' duration='10' level='0.9' label='note 2' />\n" | 216 " <point frame='20' value='124.3' duration='10' level='0.9' label='note 2' />\n" |
212 " <point frame='20' value='123.4' duration='20' level='0.8' label='note 1' />\n" | 217 " <point frame='20' value='123.4' duration='20' level='0.8' label='note 1' />\n" |
213 " <point frame='50' value='126.3' duration='30' level='0.9' label='note 3' />\n" | 218 " <point frame='50' value='126.3' duration='30' level='0.9' label='note 3' />\n" |
214 "</dataset>\n"; | 219 "</dataset>\n"; |