rsspice 0.1.0

Pure Rust port of the SPICE Toolkit for space geometry
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
//
// GENERATED FILE
//

use super::*;
use f2rust_std::*;

const MAXL: i32 = 36;
const MAXP: i32 = 150;
const NPERM: i32 = 692;
const MAXE: i32 = 853;
const NROOM: i32 = 14983;
const LNSIZE: i32 = 80;

//$Procedure F_ZZBDTRN ( Family of tests for ZZBODTRN )
pub fn F_ZZBDTRN(OK: &mut bool, ctx: &mut Context) -> f2rust_std::Result<()> {
    let mut TEXT = ActualCharArray::new(LNSIZE, 1..=6);
    let mut GET = [b' '; MAXL as usize];
    let mut CODE: i32 = 0;
    let mut FOUND: bool = false;

    //
    // Test Utility Functions
    //

    //
    // SPICELIB Functions
    //

    //
    // Local Variables
    //

    //
    // Begin every test family with an open call.
    //

    testutil::TOPEN(b"F_ZZBDTRN", ctx)?;

    //
    // CASE 1
    //
    testutil::TCASE(
        b"Checking to make sure FOUND comes back FALSE for a bogus name. ",
        ctx,
    )?;

    spicelib::BODN2C(b"SPUD", &mut CODE, &mut FOUND, ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, false, OK, ctx)?;

    //
    // CASE 2
    //
    testutil::TCASE(
        b"Checking to make sure that FOUND comes back FALSE for a bogus ID code.",
        ctx,
    )?;

    spicelib::BODC2N(22, &mut GET, &mut FOUND, ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, false, OK, ctx)?;

    //
    // CASE 3
    //
    testutil::TCASE(
        b"Checking to make sure we can load a kernel and add new ID/NAME pairs. ",
        ctx,
    )?;

    testutil::BEGDAT(&mut TEXT[1]);
    fstr::assign(TEXT.get_mut(2), b" NAIF_BODY_CODE  = ( 22, 23, 24, 25 )");
    fstr::assign(
        TEXT.get_mut(3),
        b" NAIF_BODY_NAME  = ( \'SPUD\', \'MOON\', \'CURLEY\', \'SHEMP\' )",
    );

    testutil::TSTTXT(b"sample.nam", TEXT.as_arg(), 3, true, false, ctx)?;

    spicelib::BODN2C(b"SPUD", &mut CODE, &mut FOUND, ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, true, OK, ctx)?;
    testutil::CHCKSI(b"CODE", CODE, b"=", 22, 0, OK, ctx)?;

    spicelib::BODC2N(24, &mut GET, &mut FOUND, ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, true, OK, ctx)?;
    testutil::CHCKSC(b"GET", &GET, b"=", b"CURLEY", OK, ctx)?;

    //
    // CASE 4
    //
    // Test to check we can override a name-ID assignment from the
    // default list with an external kernel assignment.
    //
    testutil::TCASE(
        b"Checking to make sure we can override an existing NAME/ID pair. ",
        ctx,
    )?;

    spicelib::BODN2C(b"MOON", &mut CODE, &mut FOUND, ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, true, OK, ctx)?;
    testutil::CHCKSI(b"CODE", CODE, b"=", 23, 0, OK, ctx)?;

    //
    // CASE 5
    //
    // Test on external name-ID assignments.
    //
    testutil::TCASE(b"Check to ensure case insensitivity in N2C.", ctx)?;

    testutil::BEGDAT(&mut TEXT[1]);
    fstr::assign(TEXT.get_mut(2), b"NAIF_BODY_CODE =  ( -170101, -170102 )");
    fstr::assign(
        TEXT.get_mut(3),
        b"NAIF_BODY_NAME =  ( \'1701-A\', \'   1701-b\' )",
    );
    fstr::assign(TEXT.get_mut(4), b" ");

    testutil::KILFIL(b"testdata.ker", ctx)?;
    testutil::TSTTXT(b"testdata.ker", TEXT.as_arg(), 4, false, true, ctx)?;
    spicelib::LDPOOL(b"testdata.ker", ctx)?;

    spicelib::BODN2C(b"1701-a", &mut CODE, &mut FOUND, ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, true, OK, ctx)?;
    testutil::CHCKSI(b"CODE", CODE, b"=", -170101, 0, OK, ctx)?;

    spicelib::BODN2C(b" 1701-B ", &mut CODE, &mut FOUND, ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, true, OK, ctx)?;
    testutil::CHCKSI(b"CODE", CODE, b"=", -170102, 0, OK, ctx)?;

    spicelib::BODC2N(-170102, &mut GET, &mut FOUND, ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, true, OK, ctx)?;
    testutil::CHCKSC(b"GET", &GET, b"=", b"   1701-b", OK, ctx)?;

    //
    // CASE 6
    //
    testutil::TCASE(
        b"Checking that we cannot override an existing kernel based NAME/ID pair.",
        ctx,
    )?;

    testutil::BEGDAT(&mut TEXT[1]);
    fstr::assign(TEXT.get_mut(2), b"NAIF_BODY_CODE =  ( -170101, -170102 )");
    fstr::assign(
        TEXT.get_mut(3),
        b"NAIF_BODY_NAME =  ( \'1701-A\', \'1701-b\' )",
    );
    fstr::assign(TEXT.get_mut(4), b"NAIF_BODY_CODE += ( -170105 )");
    fstr::assign(TEXT.get_mut(5), b"NAIF_BODY_NAME += ( \'1701-a\' )");
    fstr::assign(TEXT.get_mut(6), b" ");

    testutil::KILFIL(b"testdata.ker", ctx)?;
    testutil::TSTTXT(b"testdata.ker", TEXT.as_arg(), 6, false, true, ctx)?;

    //
    // CASE 7
    //
    // Test of BODDEF.
    //
    testutil::TCASE(b"Check BODDEF functionality.", ctx)?;

    spicelib::BODDEF(b"Woof", -10009, ctx)?;

    spicelib::BODC2N(-10009, &mut GET, &mut FOUND, ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, true, OK, ctx)?;
    testutil::CHCKSC(b"GET", &GET, b"=", b"Woof", OK, ctx)?;

    //
    // Assign a member of the equivalence class to the ID code.
    // As last on the stack, a C2N lookup should return the
    // same member string.
    //
    spicelib::BODDEF(b"woof", -10009, ctx)?;
    spicelib::BODC2N(-10009, &mut GET, &mut FOUND, ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, true, OK, ctx)?;
    testutil::CHCKSC(b"GET", &GET, b"=", b"woof", OK, ctx)?;

    //
    // Case and space insensitiviy
    //
    spicelib::BODN2C(b" WOOF ", &mut CODE, &mut FOUND, ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, true, OK, ctx)?;
    testutil::CHCKSI(b"CODE", CODE, b"=", -10009, 0, OK, ctx)?;

    //
    // Functionality unaffected by the previous test's error state?
    // Try a BODDEF.
    //
    spicelib::BODDEF(b" WOof ", -10009, ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;

    //
    // Now perform a post error case and space insensitiviy test.
    //
    spicelib::BODN2C(b"   wOOf ", &mut CODE, &mut FOUND, ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, true, OK, ctx)?;
    testutil::CHCKSI(b"CODE", CODE, b"=", -10009, 0, OK, ctx)?;

    //
    // CASE 8
    //
    // Test the mapping precedence behavior.
    //
    // Assign a mapping via BODDEF. Note: 'Tis very important to call
    // CLPOOL an clear the kernel pool before this set of tests. The
    // previous tests left the pool in an error signalling state.
    //
    spicelib::CLPOOL(ctx)?;

    testutil::TCASE(b"Check precedence functionality. BODDEF 1", ctx)?;

    spicelib::BODDEF(b"TestBODEF1", -30001, ctx)?;

    fstr::assign(&mut GET, b" ");
    spicelib::BODC2N(-30001, &mut GET, &mut FOUND, ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, true, OK, ctx)?;
    testutil::CHCKSC(b"GET", &GET, b"=", b"TestBODEF1", OK, ctx)?;

    spicelib::BODN2C(b"TestBODEF1", &mut CODE, &mut FOUND, ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, true, OK, ctx)?;
    testutil::CHCKSI(b"CODE", CODE, b"=", -30001, 0, OK, ctx)?;

    //
    // CASE 9
    //
    // Load a new mapping to the kernel pool using the previous ID value.
    // This mapping should override BODDEF.
    //
    testutil::TCASE(b"Check precedence functionality. TestKer 1", ctx)?;

    fstr::assign(TEXT.get_mut(1), b"      NAIF_BODY_NAME += \'TestKer1\'");
    fstr::assign(TEXT.get_mut(2), b"      NAIF_BODY_CODE += -30001");

    spicelib::LMPOOL(TEXT.as_arg(), 2, ctx)?;

    fstr::assign(&mut GET, b" ");
    spicelib::BODC2N(-30001, &mut GET, &mut FOUND, ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, true, OK, ctx)?;
    testutil::CHCKSC(b"GET", &GET, b"=", b"TestKer1", OK, ctx)?;

    spicelib::BODN2C(b"TestKer1", &mut CODE, &mut FOUND, ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, true, OK, ctx)?;
    testutil::CHCKSI(b"CODE", CODE, b"=", -30001, 0, OK, ctx)?;

    //
    // CASE 10
    //
    // Assign another name to the previous ID code. This mapping
    // should override all others.
    //
    testutil::TCASE(b"Check precedence functionality. TestKer 2", ctx)?;

    fstr::assign(TEXT.get_mut(1), b"      NAIF_BODY_NAME += \'TestKer2\'");
    fstr::assign(TEXT.get_mut(2), b"      NAIF_BODY_CODE += -30001");

    spicelib::LMPOOL(TEXT.as_arg(), 2, ctx)?;

    fstr::assign(&mut GET, b" ");
    spicelib::BODC2N(-30001, &mut GET, &mut FOUND, ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, true, OK, ctx)?;
    testutil::CHCKSC(b"GET", &GET, b"=", b"TestKer2", OK, ctx)?;

    spicelib::BODN2C(b"TestKer2", &mut CODE, &mut FOUND, ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, true, OK, ctx)?;
    testutil::CHCKSI(b"CODE", CODE, b"=", -30001, 0, OK, ctx)?;

    //
    // CASE 11
    //
    // Clear the kernel pool, test for BODDEF's first mapping for the
    // test ID.
    //
    testutil::TCASE(b"Check precedence functionality. BODDEF 1 retest.", ctx)?;

    spicelib::CLPOOL(ctx)?;

    fstr::assign(&mut GET, b" ");
    spicelib::BODC2N(-30001, &mut GET, &mut FOUND, ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, true, OK, ctx)?;
    testutil::CHCKSC(b"GET", &GET, b"=", b"TestBODEF1", OK, ctx)?;

    spicelib::BODN2C(b"TestBODEF1", &mut CODE, &mut FOUND, ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, true, OK, ctx)?;
    testutil::CHCKSI(b"CODE", CODE, b"=", -30001, 0, OK, ctx)?;

    //
    // CASE 12
    //
    // Assign another mapping via BODDEF to override the first
    // BODDEF mapping.
    //
    testutil::TCASE(b"Check precedence functionality. BODDEF 2.", ctx)?;

    spicelib::BODDEF(b"TestBODEF2", -30001, ctx)?;

    fstr::assign(&mut GET, b" ");
    spicelib::BODC2N(-30001, &mut GET, &mut FOUND, ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, true, OK, ctx)?;
    testutil::CHCKSC(b"GET", &GET, b"=", b"TestBODEF2", OK, ctx)?;

    spicelib::BODN2C(b"TestBODEF2", &mut CODE, &mut FOUND, ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, true, OK, ctx)?;
    testutil::CHCKSI(b"CODE", CODE, b"=", -30001, 0, OK, ctx)?;

    //
    // CASE 13
    //
    testutil::TCASE(b"Check precedence functionality. Masking.", ctx)?;

    spicelib::CLPOOL(ctx)?;

    //
    // Assign a mapping via BODDEF, then remap the name to a new
    // number.
    //
    spicelib::BODDEF(b"TestName", 20000, ctx)?;
    fstr::assign(TEXT.get_mut(1), b"      NAIF_BODY_NAME = \'TestName\'");
    fstr::assign(TEXT.get_mut(2), b"      NAIF_BODY_CODE = -20000");

    spicelib::LMPOOL(TEXT.as_arg(), 2, ctx)?;

    spicelib::BODN2C(b"TestName", &mut CODE, &mut FOUND, ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, true, OK, ctx)?;
    testutil::CHCKSI(b"CODE", CODE, b"=", -20000, 0, OK, ctx)?;

    fstr::assign(&mut GET, b" ");
    spicelib::BODC2N(-20000, &mut GET, &mut FOUND, ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, true, OK, ctx)?;
    testutil::CHCKSC(b"GET", &GET, b"=", b"TestName", OK, ctx)?;

    //
    // CASE 14
    //
    //
    // The kernel pool assignment should mask the BODDEF assignment
    // so a request for the name of body 20000 ought to fail.
    //
    testutil::TCASE(b"Check precedence functionality. De-masking.", ctx)?;

    fstr::assign(&mut GET, b" ");
    spicelib::BODC2N(20000, &mut GET, &mut FOUND, ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, false, OK, ctx)?;

    //
    // Destroy the kernel pool entries. The BODDEF assignment should now
    // respond; a request for body 20000 should succeed.
    //
    spicelib::CLPOOL(ctx)?;
    fstr::assign(&mut GET, b" ");
    spicelib::BODC2N(20000, &mut GET, &mut FOUND, ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, true, OK, ctx)?;
    testutil::CHCKSC(b"GET", &GET, b"=", b"TestName", OK, ctx)?;

    //
    // CASE 15
    //
    // Set the kernel assignment using a different body ID than
    // previous tests. This should remask the BODDEF assignment.
    //

    testutil::TCASE(b"Check precedence functionality. Re-masking.", ctx)?;

    fstr::assign(TEXT.get_mut(1), b"      NAIF_BODY_NAME = \'TestName\'");
    fstr::assign(TEXT.get_mut(2), b"      NAIF_BODY_CODE = -30000");
    spicelib::LMPOOL(TEXT.as_arg(), 2, ctx)?;

    spicelib::BODN2C(b"TestName", &mut CODE, &mut FOUND, ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, true, OK, ctx)?;
    testutil::CHCKSI(b"CODE", CODE, b"=", -30000, 0, OK, ctx)?;

    fstr::assign(&mut GET, b" ");
    spicelib::BODC2N(-30000, &mut GET, &mut FOUND, ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, true, OK, ctx)?;
    testutil::CHCKSC(b"GET", &GET, b"=", b"TestName", OK, ctx)?;

    //
    // CASE 16
    //
    // Test watcher logic in ZZBODN2C: if ZZBODKER fails due
    // to a body-name assignment error, ZZBODN2C should exit.
    // Make the call twice to ensure correct handling of the
    // error.
    //
    testutil::TCASE(b"ZZBODN2C: test CVPOOL handling for bad mapping ", ctx)?;

    spicelib::CLPOOL(ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;

    testutil::BEGDAT(&mut TEXT[1]);
    fstr::assign(TEXT.get_mut(2), b" NAIF_BODY_CODE  = ( 22, 23, 24, 25 )");
    fstr::assign(
        TEXT.get_mut(3),
        b" NAIF_BODY_NAME  = ( \'SPUD\', \'MOON\',  \'CURLEY\' )",
    );

    testutil::TSTTXT(b"sample.nam", TEXT.as_arg(), 3, true, false, ctx)?;

    spicelib::ZZBODN2C(b"MOON", &mut CODE, &mut FOUND, ctx)?;
    testutil::CHCKXC(true, b"SPICE(BADDIMENSIONS)", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, false, OK, ctx)?;

    spicelib::ZZBODN2C(b"MOON", &mut CODE, &mut FOUND, ctx)?;
    testutil::CHCKXC(true, b"SPICE(BADDIMENSIONS)", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, false, OK, ctx)?;

    //
    // CASE 17
    //
    // Test watcher logic in ZZBODC2N: if ZZBODKER fails due
    // to a body-name assignment error, ZZBODC2N should exit.
    // Make the call twice to ensure correct handling of the
    // error.
    //
    testutil::TCASE(b"ZZBODC2N: test CVPOOL handling for bad mapping ", ctx)?;

    spicelib::CLPOOL(ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;

    testutil::BEGDAT(&mut TEXT[1]);
    fstr::assign(TEXT.get_mut(2), b" NAIF_BODY_CODE  = ( 22, 23, 24, 25 )");
    fstr::assign(
        TEXT.get_mut(3),
        b" NAIF_BODY_NAME  = ( \'SPUD\', \'MOON\', \'CURLEY\' )",
    );

    testutil::TSTTXT(b"sample.nam", TEXT.as_arg(), 3, true, false, ctx)?;

    spicelib::ZZBODC2N(23, &mut GET, &mut FOUND, ctx)?;
    testutil::CHCKXC(true, b"SPICE(BADDIMENSIONS)", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, false, OK, ctx)?;

    spicelib::ZZBODC2N(23, &mut GET, &mut FOUND, ctx)?;
    testutil::CHCKXC(true, b"SPICE(BADDIMENSIONS)", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, false, OK, ctx)?;

    //
    // CASE 17
    //
    // Test watcher logic in ZZBODKIK: if ZZBODKER fails due
    // to a body-name assignment error, ZZBODKIK should exit.
    // Since ZZBODKIK doesn't make direct use of the kernel
    // pool assignments, call ZZBODC2N to ensure that it calls
    // ZZBODKER if NODATA is .TRUE. upon entry.
    //
    // Run the sequence of calls twice to ensure correct handling of the
    // error.
    //
    testutil::TCASE(b"ZZBODKIK: test CVPOOL handling for bad mapping ", ctx)?;

    spicelib::CLPOOL(ctx)?;
    testutil::CHCKXC(false, b" ", OK, ctx)?;

    testutil::BEGDAT(&mut TEXT[1]);
    fstr::assign(TEXT.get_mut(2), b" NAIF_BODY_CODE  = ( 22, 23, 24, 25 )");
    fstr::assign(
        TEXT.get_mut(3),
        b" NAIF_BODY_NAME  = ( \'SPUD\', \'MOON\', \'CURLEY\' )",
    );

    testutil::TSTTXT(b"sample.nam", TEXT.as_arg(), 3, true, false, ctx)?;

    spicelib::ZZBODKIK(ctx)?;
    testutil::CHCKXC(true, b"SPICE(BADDIMENSIONS)", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, false, OK, ctx)?;

    spicelib::ZZBODC2N(23, &mut GET, &mut FOUND, ctx)?;
    testutil::CHCKXC(true, b"SPICE(BADDIMENSIONS)", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, false, OK, ctx)?;

    spicelib::ZZBODKIK(ctx)?;
    testutil::CHCKXC(true, b"SPICE(BADDIMENSIONS)", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, false, OK, ctx)?;

    spicelib::ZZBODC2N(23, &mut GET, &mut FOUND, ctx)?;
    testutil::CHCKXC(true, b"SPICE(BADDIMENSIONS)", OK, ctx)?;
    testutil::CHCKSL(b"FOUND", FOUND, false, OK, ctx)?;

    testutil::T_SUCCESS(OK, ctx);
    Ok(())
}