about summary refs log blame commit diff stats
path: root/cpp/.traces/array_length
blob: 1c08d76598bee31d0ac85293591402b7a1905ad4 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                                                     
                        
                                                                                             






                                                                                
                                                   
                













                               
parse/0: instruction: 1
parse/0:   ingredient: {name: "3", value: 0, type: 0, properties: ["3": "literal"]}
parse/0:   product: {name: "1", value: 0, type: 1, properties: ["1": "integer"]}
parse/0: instruction: 1
parse/0:   ingredient: {name: "14", value: 0, type: 0, properties: ["14": "literal"]}
parse/0:   product: {name: "2", value: 0, type: 1, properties: ["2": "integer"]}
parse/0: instruction: 1
parse/0:   ingredient: {name: "15", value: 0, type: 0, properties: ["15": "literal"]}
parse/0:   product: {name: "3", value: 0, type: 1, properties: ["3": "integer"]}
parse/0: instruction: 1
parse/0:   ingredient: {name: "16", value: 0, type: 0, properties: ["16": "literal"]}
parse/0:   product: {name: "4", value: 0, type: 1, properties: ["4": "integer"]}
parse/0: instruction: 23
parse/0:   ingredient: {name: "1", value: 0, type: 5-1, properties: ["1": "array":"integer"]}
parse/0:   product: {name: "5", value: 0, type: 1, properties: ["5": "integer"]}
after-brace/0: recipe main
after-brace/0: copy ...
after-brace/0: copy ...
after-brace/0: copy ...
after-brace/0: copy ...
after-brace/0: length ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: main
run/0: instruction main/0
run/0: ingredient 0 is 3
mem/0: storing 3 in location 1
run/0: instruction main/1
run/0: ingredient 0 is 14
mem/0: storing 14 in location 2
run/0: instruction main/2
run/0: ingredient 0 is 15
mem/0: storing 15 in location 3
run/0: instruction main/3
run/0: ingredient 0 is 16
mem/0: storing 16 in location 4
run/0: instruction main/4
mem/0: storing 3 in location 5
='#n33'>33
34
35
36
37
38
39
40








                      

                  
                       
 
                              
 

                      

                                                           

                             
                                                            


                                                         
                                                   
                        
 


                                                  

                             
                                                         
 
                                                    
 
                                                   
                        
 
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>

#include "xmpp/xmpp.h"

#include "ui/ui.h"
#include "ui/stub_ui.h"

#include "command/cmd_funcs.h"

#define CMD_SUB "/sub"

void cmd_sub_shows_message_when_not_connected(void **state)
{
    gchar *args[] = { NULL };

    will_return(connection_get_status, JABBER_DISCONNECTED);

    expect_cons_show("You are currently not connected.");

    gboolean result = cmd_sub(NULL, CMD_SUB, args);
    assert_true(result);
}

void cmd_sub_shows_usage_when_no_arg(void **state)
{
    gchar *args[] = { NULL };

    will_return(connection_get_status, JABBER_CONNECTED);

    expect_string(cons_bad_cmd_usage, cmd, CMD_SUB);

    gboolean result = cmd_sub(NULL, CMD_SUB, args);
    assert_true(result);
}