Commit feb33e87 authored by Ghislain MARY's avatar Ghislain MARY

Add verbose checkbox.

parent 5f4dfd1e
......@@ -10,7 +10,7 @@ CainSipTesterNative::CainSipTesterNative()
{
}
void CainSipTesterNative::run(Platform::String^ name)
void CainSipTesterNative::run(Platform::String^ name, Platform::Boolean verbose)
{
char suitename[128];
const wchar_t *wcname;
......@@ -19,6 +19,10 @@ void CainSipTesterNative::run(Platform::String^ name)
wcname = name->Data();
wcstombs(suitename, wcname, sizeof(suitename));
if (strncmp(suitename, "ALL", sizeof(suitename)) == 0) suitename[0] = '\0';
belle_sip_set_log_level(BELLE_SIP_LOG_DEBUG);
if (verbose) {
belle_sip_set_log_level(BELLE_SIP_LOG_DEBUG);
} else {
belle_sip_set_log_level(BELLE_SIP_LOG_ERROR);
}
belle_sip_tester_run_tests(suitename[0] == '\0' ? 0 : suitename, 0);
}
......@@ -10,6 +10,6 @@ namespace belle_sip_tester_native
{
public:
CainSipTesterNative();
void run(Platform::String^ name);
void run(Platform::String^ name, Platform::Boolean verbose);
};
}
\ No newline at end of file
......@@ -55,8 +55,9 @@
</StackPanel>
<!--ContentPanel - place additional content here-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<phone:LongListSelector x:Name="Tests" HorizontalAlignment="Left" Height="580" VerticalAlignment="Top" Width="456" ItemTemplate="{StaticResource UnitTestItemTemplate}" LayoutMode="List"/>
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,10,12,0">
<CheckBox x:Name="Verbose" Content="Verbose" HorizontalAlignment="Right" Margin="0,0,0,500" IsChecked="True"/>
<phone:LongListSelector x:Name="Tests" HorizontalAlignment="Left" Height="510" VerticalAlignment="Top" Width="456" ItemTemplate="{StaticResource UnitTestItemTemplate}" LayoutMode="List" Margin="0,70,0,-10"/>
</Grid>
<!--Uncomment to see an alignment grid to help ensure your controls are
......
......@@ -43,11 +43,13 @@ namespace belle_sip_tester_wp8
void tests_selectionChanged(object sender, SelectionChangedEventArgs e)
{
UnitTest test = (sender as LongListSelector).SelectedItem as UnitTest;
var t = Task.Factory.StartNew((object name) =>
var tup = new Tuple<String, bool>(test.Name, Verbose.IsChecked.GetValueOrDefault());
var t = Task.Factory.StartNew((object parameters) =>
{
var tester = new CainSipTesterNative();
tester.run(name as String);
}, test.Name);
var p = parameters as Tuple<String, bool>;
tester.run(p.Item1, p.Item2);
}, tup);
}
// Sample code for building a localized ApplicationBar
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment