about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-01-31 23:40:51 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-01-31 23:51:58 -0800
commit48a74397fb1a967fffa67ffb80005d94ed2ac60c (patch)
tree97d64ca0b302c52cdbb802ddb9da4d5a54b876c3
parentdf437f78e95a39bba36df6ffc1c00783bd80b4c6 (diff)
downloadmu-48a74397fb1a967fffa67ffb80005d94ed2ac60c.tar.gz
689
Typo in a recent test.
-rw-r--r--mu.arc.t4
1 files changed, 3 insertions, 1 deletions
diff --git a/mu.arc.t b/mu.arc.t
index 8761664e..7eb6a65c 100644
--- a/mu.arc.t
+++ b/mu.arc.t
@@ -2322,14 +2322,16 @@
      ])
     (function main [
       (1:space-address <- f)
-      (2:integer <- g 1:space-address)
+      (2:integer 3:integer <- g 1:space-address)
      ])))
 (run 'main)
 (each routine completed-routines*
   (aif rep.routine!error (prn "error - " it)))
+;? (prn memory*) ;? 1
 (when (or (~is memory*.2 5)
           (~is memory*.3 5))
   (prn "F - new names in shared spaces don't override old ones"))
+;? (quit) ;? 1
 
 )  ; section 20
 
font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include <stdlib.h>
#include <string.h>

#include "xmpp/chat_session.h"
#include "command/cmd_funcs.h"
#include "xmpp/xmpp.h"
#include "xmpp/roster_list.h"

#include "ui/stub_ui.h"

#define CMD_DISCONNECT "/disconnect"

void clears_chat_sessions(void **state)
{
    chat_sessions_init();
    roster_create();
    chat_session_recipient_active("bob@server.org", "laptop", FALSE);
    chat_session_recipient_active("mike@server.org", "work", FALSE);

    will_return(connection_get_status, JABBER_CONNECTED);
    will_return(connection_get_fulljid, "myjid@myserver.com");
    expect_any_cons_show();

    gboolean result = cmd_disconnect(NULL, CMD_DISCONNECT, NULL);

    assert_true(result);

    ChatSession *session1 = chat_session_get("bob@server.org");
    ChatSession *session2 = chat_session_get("mike@server.org");
    assert_null(session1);
    assert_null(session2);
}