File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -283,6 +283,21 @@ describe('Generator Tests', () => {
283
283
} ) ;
284
284
285
285
describe ( 'Trait Generation Tests' , ( ) => {
286
+ it ( 'should generate FeeEstimator' , ( ) => {
287
+ const __dirname = url . fileURLToPath ( new URL ( '.' , import . meta. url ) ) ;
288
+ const config = new TestConfig ( `${ __dirname } /../res/lightning_01.h` ) ;
289
+ const parser = new Parser ( config ) ;
290
+ parser . parse ( ) ;
291
+
292
+ const generator = new TraitGenerator ( config , new AuxiliaryArtifacts ( ) ) ;
293
+ const feeest = < RustTrait > parser . glossary [ 'LDKFeeEstimator' ] ;
294
+ const output = generator . generateFileContents ( feeest ) ;
295
+
296
+ chai . expect ( output ) . includes ( 'public init() {' ) ;
297
+ chai . expect ( output ) . includes ( 'self.cType = LDKFeeEstimator(' ) ;
298
+ chai . expect ( output ) . includes ( 'get_est_sat_per_1000_weight: getEstSatPer1000WeightLambda,' ) ;
299
+ chai . expect ( output ) . includes ( 'open func getEstSatPer1000Weight(confirmationTarget: ConfirmationTarget) -> UInt32 {' ) ;
300
+ } ) ;
286
301
it ( 'should generate BaseSign completely' , ( ) => {
287
302
const __dirname = url . fileURLToPath ( new URL ( '.' , import . meta. url ) ) ;
288
303
const config = new TestConfig ( `${ __dirname } /../res/lightning_01.h` ) ;
You can’t perform that action at this time.
0 commit comments